mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
31 lines
1.1 KiB
JavaScript
31 lines
1.1 KiB
JavaScript
/**
|
|
* @fileoverview UI navigation and view state store.
|
|
*/
|
|
|
|
import { createReactiveStore } from '../core/reactive.js';
|
|
import { t } from '../i18n/index.js';
|
|
|
|
export const VIEW_TABS = Object.freeze([
|
|
{ value: 'overview', label: '实时监控', icon: 'pulse' },
|
|
{ value: 'consumption', label: '用量统计', icon: 'chart-bar' },
|
|
{ value: 'steps', label: '调用明细', icon: 'table' },
|
|
{ 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' | 'account' | 'other'
|
|
selectedAgentScope: 'all', // 'all' | 'main' | <subagent cascadeId>
|
|
ctxInspectorAgentId: 'auto', // 'auto' | 'main' | <subagent cascadeId>
|
|
});
|