refactor(panel): extract sqlite/wire primitives, localize charts & structured status, and unify overlay/mock-dom (P2)

This commit is contained in:
fish
2026-11-18 18:46:53 +09:00
parent 1459240751
commit a954a98080
26 changed files with 3393 additions and 3418 deletions
+83
View File
@@ -523,4 +523,87 @@ export const I18N_MESSAGES_ZH_CN = Object.freeze({
'settings.oth.resetConfirmBtn': '再次点击确认重置',
'settings.oth.resettingBtn': '重置中…',
'settings.oth.resetAllDone': '已恢复全部默认设置',
// Structured Live Activity Actions
'live.act.run_command': '执行命令',
'live.act.read_file': '读取文件',
'live.act.edit_file': '修改文件',
'live.act.write_file': '写入文件',
'live.act.grep_search': '搜索代码',
'live.act.find_file': '查找文件',
'live.act.read_url': '读取网页',
'live.act.search_web': '网页搜索',
'live.act.invoke_subagent': '调用子代理',
'live.act.send_message': '通信子代理',
'live.act.manage_subagents': '管理子代理',
'live.act.manage_task': '后台任务',
'live.act.schedule': '定时任务',
'live.act.ask_question': '等待用户选择',
'live.act.search_marketplace': '查询插件',
'live.act.mcp_tool': '调用 MCP',
'live.act.tool_call': '调用工具',
'live.act.thinking': '推理中',
'live.act.compacting': '上下文压缩',
'live.act.responding': '正在输出回复',
'live.act.waiting_subagent': '等待子代理',
'live.act.starting': '启动中',
'live.act.done': '已完成',
'live.act.awaitingApproval': '等待确认 · {label}',
'live.act.compactionResuming': '已完成压缩,正在恢复推理',
// SVG Charts (SessionStepCharts & TrendAreaChart)
'chart.step.empty': '当前范围暂无可绘制的调用步骤',
'chart.step.excluded': '未纳入',
'chart.step.zeroSteps': '0 步',
'chart.step.stepAdd': '本步 +{tokens}',
'chart.step.ioSplit': '入 {inTok} · 缓 {cacheTok} · 出 {outTok}',
'chart.step.cacheShort': '缓存 {pct}%',
'chart.step.compactionCheckpoint': '上下文自动压缩检查点',
'chart.step.cacheHitOut': '缓存命中 {pct}% · 输出 +{outTok}',
'chart.step.ttftShort': '首字 {sec}s',
'chart.step.outAndCtx': '输出 {outTok} · 上下文 {ctxTok}',
'chart.step.compactionStep': '上下文压缩步',
'chart.step.noSpeedSample': '无测速样本',
'chart.step.ctxAndCache': '上下文 {ctxTok} · 缓存 {pct}%',
'chart.step.noTtftSample': '无首字计时样本',
'chart.step.cumCost': '累计 {cost}',
'chart.step.cacheAndStepTok': '缓存 {pct}% · 本步 {tokens}',
'chart.step.noSamples': '无样本',
'chart.step.peakShort': '峰 {val}',
'chart.step.peakPill': '峰值 {tag} · {val}',
'chart.step.stepsCount': '{count}步',
'chart.step.multiPrefix': '{count} 模型 · ',
'chart.step.sumTokens': '{prefix}累计 {tokens}',
'chart.step.peakTokens': '{prefix}峰值 {tokens}',
'chart.step.currentCtx': '当前 {tokens}',
'chart.step.meanTps': '{prefix}均值 {val} tok/s',
'chart.step.meanSec': '{prefix}均值 {val}s',
'chart.step.noValidSamples': '暂无有效样本',
'chart.step.sumCost': '{prefix}累计 {cost}',
'chart.fit.empty': '该模型暂无有效拟合样本',
'chart.fit.loess': 'LOESS 拟合',
'chart.fit.olsLinear': 'OLS 线性',
'chart.fit.olsReg': 'OLS 回归',
'chart.fit.observed': '观测值',
'chart.fit.tipFit': '拟合 {val}',
'chart.fit.tipObs': '观测 {val}',
'chart.fit.zeroSamples': '0 样本',
'chart.fit.peerMean': '{label} 均 {val}',
'chart.fit.peerCompare': '同图对比:{peers}',
'chart.fit.curvesCount': '{count} 条拟合线',
'chart.fit.multiBadge': '{steps}步 · {models} 模型对比',
'chart.fit.singleBadge': '{steps}步 · 均 {mean}',
'chart.fit.olsTitle': 'OLS: y = {slope}x + {intercept} · 样本标准差 SD = ±{sd}',
'chart.trend.hmMonthYear': '{yy}年{month}月',
'chart.trend.hmMonthOnly': '{month}月',
'chart.trend.wdayMon': '一',
'chart.trend.wdayWed': '三',
'chart.trend.wdayFri': '五',
'chart.trend.wdaySun': '日',
'chart.trend.hmAria': '每日用量热力格子图',
'chart.trend.hmLess': '少',
'chart.trend.hmMore': '多',
'chart.trend.hmActivePeak': '活跃 {active}/{total} 天 · 峰值 {label} · {tokens}',
'chart.trend.hmActiveZero': '活跃 0/{total} 天',
'chart.trend.peakPill': '峰值 {label} · {tokens}',
});