Skip to content

Commit b65e052

Browse files
committed
fix: clean code
1 parent 7f7afd5 commit b65e052

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

src/renderer/src/components/message/MessageBlockToolCall.vue

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -122,32 +122,7 @@ import { CodeBlockNode } from 'markstream-vue'
122122
import { useThemeStore } from '@/stores/theme'
123123
import { 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
152127
const themeStore = useThemeStore()
153128

0 commit comments

Comments
 (0)