优化: aichat 体验收尾(useAiEvents拆分4子域 + AIC-FIX P1队列/mutex/缓存 + i18n残留抽取)
This commit is contained in:
@@ -172,8 +172,8 @@
|
||||
<div class="ai-context-section-title">{{ $t('aiChat.contextSystemPrompt') }}</div>
|
||||
<div class="ai-context-section-body">
|
||||
<div class="ai-context-row">
|
||||
<span class="ai-context-label">目标({{ contextInfo.goals.length }})</span>
|
||||
<span class="ai-context-value">{{ contextInfo.goals.join('; ') || '无' }}</span>
|
||||
<span class="ai-context-label">{{ $t('aiChat.goalsCount', { n: contextInfo.goals.length }) }}</span>
|
||||
<span class="ai-context-value">{{ contextInfo.goals.join('; ') || $t('aiChat.none') }}</span>
|
||||
</div>
|
||||
<div class="ai-context-row">
|
||||
<span class="ai-context-label">{{ $t('aiChat.contextEnvironment') }}</span>
|
||||
@@ -190,8 +190,8 @@
|
||||
<div class="ai-context-section-title">{{ $t('aiChat.contextEnrichment') }}</div>
|
||||
<div class="ai-context-section-body">
|
||||
<div class="ai-context-row">
|
||||
<span class="ai-context-label">@项目</span>
|
||||
<span class="ai-context-value">{{ contextInfo.projectNames || '无' }}</span>
|
||||
<span class="ai-context-label">{{ $t('aiChat.projectLabel') }}</span>
|
||||
<span class="ai-context-value">{{ contextInfo.projectNames || $t('aiChat.none') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -325,9 +325,13 @@ function onModelSelect(e: Event) {
|
||||
store.modelOverride.value = v || null
|
||||
}
|
||||
|
||||
// 切换会话默认选中权重最高 model
|
||||
// 切换会话:仅当手选模型空/对目标模型池无效时才回落权重最高(保留用户手选,不每次重置)
|
||||
watch(() => store.state.activeConversationId, () => {
|
||||
store.modelOverride.value = enabledModels.value[0]?.model_id || null
|
||||
const current = store.modelOverride.value
|
||||
const valid = current && enabledModels.value.some(m => m.model_id === current)
|
||||
if (!valid) {
|
||||
store.modelOverride.value = enabledModels.value[0]?.model_id || null
|
||||
}
|
||||
})
|
||||
|
||||
// 切 provider 后模型 override 同步(BUG-2026-07-07:provider 切换后 header 模型名不刷新):
|
||||
@@ -372,7 +376,7 @@ function fmtTime(ts: number): string {
|
||||
const yest = new Date(now)
|
||||
yest.setDate(yest.getDate() - 1)
|
||||
if (d.getFullYear() === yest.getFullYear() && d.getMonth() === yest.getMonth() && d.getDate() === yest.getDate()) {
|
||||
return `昨天 ${hm}`
|
||||
return `${t('aiChat.yesterday')} ${hm}`
|
||||
}
|
||||
// 更早
|
||||
return `${pad(d.getMonth()+1)}-${pad(d.getDate())} ${hm}`
|
||||
@@ -481,7 +485,7 @@ const contextInfo = computed<ContextInfo>(() => {
|
||||
goals: conv?.pinned_goals ?? [],
|
||||
summaryCount: summaryMsgs.value.length,
|
||||
osInfo: 'Windows 11 / PowerShell',
|
||||
projectNames: Array.from(projectLabels).join(', ') || '无',
|
||||
projectNames: Array.from(projectLabels).join(', ') || t('aiChat.none'),
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user