优化: 代码质量收尾(搜索索引补全+编译警告清理+i18n核验+String替newtype)

This commit is contained in:
lxy
2026-07-01 12:11:35 +08:00
parent 0338210ba2
commit 6771d396f0
15 changed files with 242 additions and 36 deletions
+2 -1
View File
@@ -11,6 +11,7 @@
import { invoke } from '@tauri-apps/api/core'
import { state } from '@/stores/ai'
import { nextMsgId, getConvState, convStates } from './aiShared'
import type { MessageId } from '@/api/types'
import { setStreaming } from './streamingGuard'
import { persistUiState } from './useAiPanel'
@@ -194,7 +195,7 @@ export async function restoreGeneratingState(opts?: { fromMainPanel?: boolean; c
state.currentText = (opts?.convId && localStorage.getItem(textKey(opts.convId))) || localStorage.getItem('df-ai-text') || ''
}
state.messages.push({
id: `ai-${nextMsgId()}`,
id: `ai-${nextMsgId()}` as MessageId,
role: 'assistant',
content: '',
timestamp: Date.now(),