refactor(panel): complete shared single-source rules, isolate per-module bundle scopes, and purify scoped selector

This commit is contained in:
fish
2026-11-18 17:05:47 +09:00
parent 67e2f047dd
commit 1459240751
29 changed files with 2036 additions and 1928 deletions
@@ -20,37 +20,18 @@ import {
} from '../core/formatters.js';
import { t } from '../i18n/index.js';
import {
DEFAULT_CLIENT_STEP_TOKEN_COMBO_FORMAT,
normalizeClientStepTokenComboFormat,
parseClientStepTokenComboSegments,
} from '../store/telemetryStore.js';
DEFAULT_STEP_TABLE_COLUMNS,
DEFAULT_STEP_TOKEN_COMBO_FORMAT,
STEP_TABLE_COLUMN_KEYS,
normalizeStepTokenComboFormat,
parseStepTokenComboSegments,
} from '../../shared/settings-normalization.mjs';
export const STEP_COLUMN_KEYS = Object.freeze([
'step',
'time',
'model',
'tps',
'ttft',
'duration',
'tokens_combo',
'tokens_io_cache',
'tokens_custom',
'input_tokens',
'cache_tokens',
'output_tokens',
'cache',
'cost',
]);
export const DEFAULT_STEP_COLUMN_KEYS = Object.freeze([
'step',
'model',
'tps',
'ttft',
'tokens_combo',
'cache',
'cost',
]);
export const STEP_COLUMN_KEYS = STEP_TABLE_COLUMN_KEYS;
export const DEFAULT_STEP_COLUMN_KEYS = DEFAULT_STEP_TABLE_COLUMNS;
const DEFAULT_CLIENT_STEP_TOKEN_COMBO_FORMAT = DEFAULT_STEP_TOKEN_COMBO_FORMAT;
const normalizeClientStepTokenComboFormat = normalizeStepTokenComboFormat;
const parseClientStepTokenComboSegments = parseStepTokenComboSegments;
function resolveStepTokenParts(st) {
const inTok = Math.max(0, Number(st?.inputTokens || 0));