fix(ui): 统一工具名称显示并调整默认语言设置

将工具名称从英文改为中文显示,并移除查询文本的引号
调整语言选项顺序并将默认语言设置为中文
将Milvus显示名称改为CommonRAG
This commit is contained in:
Wenjie Zhang 2025-12-29 19:52:18 +08:00
parent e0f7d3dc14
commit 2271555a11
4 changed files with 13 additions and 9 deletions

View File

@ -4,7 +4,7 @@
<div class="sep-header">
<span class="note">{{ operationLabel }}</span>
<span class="separator" v-if="queryText">|</span>
<span class="description">"{{ queryText }}"</span>
<span class="description">{{ queryText }}</span>
</div>
</template>
<template #result="{ resultContent }">
@ -146,6 +146,10 @@ const args = computed(() => {
}
});
const toolName = computed(() => {
return props.toolCall.name || props.toolCall.function?.name || '知识库';
});
//
const operation = computed(() => {
return args.value.operation || 'search';
@ -154,8 +158,8 @@ const operation = computed(() => {
//
const operationLabel = computed(() => {
const labels = {
search: `${props.toolCall.name} 搜索`,
get_mindmap: props.toolCall.name
search: `${toolName.value} 搜索`,
get_mindmap: toolName.value
};
return labels[operation.value] || operation.value;
});

View File

@ -2,7 +2,7 @@
<BaseToolCall :tool-call="toolCall" :hide-params="true">
<template #header>
<div class="sep-header">
<span class="note">knowledgegraph</span>
<span class="note">知识图谱</span>
<span class="separator" v-if="query">|</span>
<span class="description">{{ query }}</span>
</div>

View File

@ -2,9 +2,9 @@
<BaseToolCall :tool-call="toolCall" :hide-params="true">
<template #header>
<div class="sep-header">
<span class="note">websearch</span>
<span class="note">网络搜索</span>
<span class="separator" v-if="query">|</span>
<span class="description">"{{ query }}"</span>
<span class="description">{{ query }}</span>
</div>
</template>
<template #result="{ resultContent }">

View File

@ -260,8 +260,8 @@ const state = reactive({
// 使/LightRAG 便
const languageOptions = [
{ label: '英语 English', value: 'English' },
{ label: '中文 Chinese', value: 'Chinese' },
{ label: '英语 English', value: 'English' },
{ label: '日语 Japanese', value: 'Japanese' },
{ label: '韩语 Korean', value: 'Korean' },
{ label: '德语 German', value: 'German' },
@ -280,7 +280,7 @@ const createEmptyDatabaseForm = () => ({
kb_type: 'milvus',
is_private: false,
storage: '',
language: 'English',
language: 'Chinese',
llm_info: {
provider: '',
model_name: ''
@ -396,7 +396,7 @@ const getKbTypeLabel = (type) => {
const labels = {
lightrag: 'LightRAG',
chroma: 'Chroma',
milvus: 'Milvus'
milvus: 'CommonRAG'
}
return labels[type] || type
}