@@ -122,32 +122,7 @@ import { CodeBlockNode } from 'markstream-vue'
122122import { useThemeStore } from ' @/stores/theme'
123123import { getLanguageFromFilename } from ' @shared/utils/codeLanguage'
124124
125- const keyMap = {
126- ' toolCall.calling' : ' 工具调用中' ,
127- ' toolCall.response' : ' 工具响应' ,
128- ' toolCall.end' : ' 工具调用完成' ,
129- ' toolCall.error' : ' 工具调用错误' ,
130- ' toolCall.title' : ' 工具调用' ,
131- ' toolCall.clickToView' : ' 点击查看详情' ,
132- ' toolCall.functionName' : ' 函数名称' ,
133- ' toolCall.params' : ' 参数' ,
134- ' toolCall.responseData' : ' 响应数据' ,
135- ' toolCall.terminalOutput' : ' Terminal output' ,
136- ' toolCall.replacementsCount' : ' 已完成 {count} 处替换' ,
137- ' common.copy' : ' 复制' ,
138- ' common.copySuccess' : ' 已复制'
139- }
140-
141- type TranslateFn = (key : string , params ? : Record <string , unknown >) => string
142-
143- const t: TranslateFn = (() => {
144- try {
145- const { t } = useI18n ()
146- return t as TranslateFn
147- } catch (e ) {
148- return (key : string ) => keyMap [key ] || key
149- }
150- })()
125+ const { t } = useI18n ()
151126
152127const themeStore = useThemeStore ()
153128
0 commit comments