feat(panel): modularize 3-tab preferences, add model context windows, and optimize telemetry

- Refactor Preferences into decoupled General, Structure, and Other tabs with unified settings schema, factory reset, and trajectory cache rebuild endpoints
- Extract standalone widget, metric, and step-table column registries to customize topbar/composer slots, hover popup modules, live overview layout, and step detail columns
- Add bilingual zh-CN/en-US i18n dictionaries, theme accent presets, and font scale controls across Shadow DOM overlay and sidebar views
- Support per-model host-advertised context window rules across App and IDE transports
- Preserve CLEARED step generation timings, memoize per-poll model resolution, optimize LOESS sorted-x fitting, and update bilingual READMEs and test suites
This commit is contained in:
fish
2026-11-15 01:18:29 +09:00
parent ad33e9cc62
commit 18c608ae63
63 changed files with 16614 additions and 5873 deletions
+11
View File
@@ -3,6 +3,7 @@
*/
import { createReactiveStore } from '../core/reactive.js';
import { t } from '../i18n/index.js';
export const VIEW_TABS = Object.freeze([
{ value: 'overview', label: '实时监控', icon: 'pulse' },
@@ -11,9 +12,19 @@ export const VIEW_TABS = Object.freeze([
{ value: 'settings', label: '偏好设置', icon: 'sliders' },
]);
export function getViewTabs() {
return [
{ value: 'overview', label: t('nav.overview'), icon: 'pulse' },
{ value: 'consumption', label: t('nav.consumption'), icon: 'chart-bar' },
{ value: 'steps', label: t('nav.steps'), icon: 'table' },
{ value: 'settings', label: t('nav.settings'), icon: 'sliders' },
];
}
export const uiStore = createReactiveStore({
activeView: 'overview',
stepsSubTab: 'steps', // 'steps' | 'models'
settingsSubTab: 'general', // 'general' | 'structure' | 'other'
selectedAgentScope: 'all', // 'all' | 'main' | <subagent cascadeId>
ctxInspectorAgentId: 'auto', // 'auto' | 'main' | <subagent cascadeId>
});