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
+16 -13
View File
@@ -435,17 +435,20 @@ export const StepsDetailView = defineComponent({
let isDirty = false;
function resolveDefaultActiveModelKey(scopedConv, chronoSteps, models, availableModelKeys) {
const activeCand = getStepModelGroupKey({
modelLabel: scopedConv?.activeModelLabel,
modelShort: scopedConv?.activeModelShort,
});
if (
activeCand &&
activeCand !== '模型未知' &&
activeCand !== t('fmt.unknownModel') &&
availableModelKeys.has(activeCand)
) {
return activeCand;
if (scopedConv?.hasKnownModel !== false) {
const activeCand = getStepModelGroupKey({
baseModelLabel: scopedConv?.activeBaseModelLabel,
baseModelShort: scopedConv?.activeBaseModelShort,
modelLabel: scopedConv?.activeModelLabel,
modelShort: scopedConv?.activeModelShort,
});
if (
activeCand &&
activeCand !== t('fmt.unknownModel') &&
availableModelKeys.has(activeCand)
) {
return activeCand;
}
}
for (let i = chronoSteps.length - 1; i >= 0; i--) {
const st = chronoSteps[i];
@@ -625,7 +628,7 @@ export const StepsDetailView = defineComponent({
if (!stepModelOptionMap.has(gk)) {
const disp = resolveModelDisplayInfo(st, displaySettings, { fallback: gk });
stepModelOptionMap.set(gk, {
label: disp.text.replace(/·(?:压缩|Compact)\s*$/iu, '').trim() || gk,
label: disp.baseText || disp.text || gk,
calls: 0,
});
}
@@ -656,7 +659,7 @@ export const StepsDetailView = defineComponent({
});
perModelOptions.push({
value: gk,
label: disp.text.replace(/·(?:压缩|Compact)\s*$/iu, '').trim() || gk,
label: disp.baseText || disp.text || gk,
meta: t('header.convMetaSteps', { count: Number(m.calls || 0) }),
});
}