diff --git a/dashboard/src/components/shared/PersonaForm.vue b/dashboard/src/components/shared/PersonaForm.vue
index 19865feb6..95aa77f66 100644
--- a/dashboard/src/components/shared/PersonaForm.vue
+++ b/dashboard/src/components/shared/PersonaForm.vue
@@ -90,31 +90,52 @@
@@ -155,11 +176,26 @@
-
- {{ toolName }}
-
+
+
+
+ {{ toolName }}
+
+
+ {{ tm('form.builtinToolDisabledHint') }}
+
{{ tm('form.noToolsSelected') }}
@@ -712,6 +748,9 @@ export default {
},
toggleTool(toolName) {
+ if (this.isBuiltinToolName(toolName)) {
+ return;
+ }
// 如果当前是全选状态,需要先转换为具体的工具列表
if (this.personaForm.tools === null) {
// 如果是全选状态,点击某个工具表示要取消选择该工具
@@ -735,6 +774,9 @@ export default {
},
removeTool(toolName) {
+ if (this.isBuiltinToolName(toolName)) {
+ return;
+ }
// 如果当前是全选状态,需要先转换为具体的工具列表
if (this.personaForm.tools === null) {
// 创建一个包含所有工具的数组,然后移除指定工具
@@ -784,6 +826,14 @@ export default {
return text.length > maxLength ? text.substring(0, maxLength) + '...' : text;
},
+ isBuiltinTool(tool) {
+ return tool?.origin === 'builtin' || tool?.readonly === true;
+ },
+
+ isBuiltinToolName(toolName) {
+ return this.availableTools.some(tool => tool.name === toolName && this.isBuiltinTool(tool));
+ },
+
getDialogRules(index) {
const dialogType = index % 2 === 0 ? this.tm('form.userMessage') : this.tm('form.assistantMessage');
return [
@@ -859,6 +909,12 @@ export default {
overflow-y: auto;
}
+.builtin-tool-checkbox-placeholder {
+ width: 40px;
+ height: 40px;
+ flex: 0 0 40px;
+}
+
.skills-selection {
max-height: 300px;
overflow-y: auto;
diff --git a/dashboard/src/components/shared/PersonaQuickPreview.vue b/dashboard/src/components/shared/PersonaQuickPreview.vue
index c8ce6d51a..a15ff84ec 100644
--- a/dashboard/src/components/shared/PersonaQuickPreview.vue
+++ b/dashboard/src/components/shared/PersonaQuickPreview.vue
@@ -117,7 +117,9 @@ const defaultPersonaData = {
const normalizedTools = computed(() => (Array.isArray(personaData.value?.tools) ? personaData.value.tools : []))
const normalizedSkills = computed(() => (Array.isArray(personaData.value?.skills) ? personaData.value.skills : []))
-const allToolsCount = computed(() => Object.keys(toolMetaMap.value).length)
+const allToolsCount = computed(() =>
+ Object.values(toolMetaMap.value).filter((tool) => tool.origin !== 'builtin').length
+)
const allSkillsCount = computed(() => availableSkills.value.length)
const resolvedTools = computed(() =>
normalizedTools.value.map((toolName) => {
diff --git a/dashboard/src/i18n/locales/en-US/features/persona.json b/dashboard/src/i18n/locales/en-US/features/persona.json
index 84aaef52c..3dc865c02 100644
--- a/dashboard/src/i18n/locales/en-US/features/persona.json
+++ b/dashboard/src/i18n/locales/en-US/features/persona.json
@@ -35,6 +35,7 @@
"mcpServersQuickSelect": "MCP Servers Quick Select",
"searchTools": "Search Tools",
"selectedTools": "Selected Tools",
+ "builtinToolDisabledHint": "Builtin tools cannot be enabled or disabled here yet. Please enable or disable the corresponding config items in the config file.",
"noToolsAvailable": "No tools available",
"noToolsFound": "No matching tools found",
"loadingTools": "Loading tools...",
diff --git a/dashboard/src/i18n/locales/ru-RU/features/persona.json b/dashboard/src/i18n/locales/ru-RU/features/persona.json
index e6e58ad7f..f7e0aff25 100644
--- a/dashboard/src/i18n/locales/ru-RU/features/persona.json
+++ b/dashboard/src/i18n/locales/ru-RU/features/persona.json
@@ -35,6 +35,7 @@
"mcpServersQuickSelect": "Быстрый выбор MCP серверов",
"searchTools": "Поиск инструментов",
"selectedTools": "Выбранные инструменты",
+ "builtinToolDisabledHint": "Встроенные инструменты пока нельзя включать или выключать здесь. Измените соответствующие параметры в файле конфигурации.",
"noToolsAvailable": "Нет доступных инструментов",
"noToolsFound": "Инструменты не найдены",
"loadingTools": "Загрузка инструментов...",
@@ -143,4 +144,4 @@
"success": "Объект перемещен",
"error": "Ошибка перемещения"
}
-}
\ No newline at end of file
+}
diff --git a/dashboard/src/i18n/locales/zh-CN/features/persona.json b/dashboard/src/i18n/locales/zh-CN/features/persona.json
index d3eec49a5..e707a5d62 100644
--- a/dashboard/src/i18n/locales/zh-CN/features/persona.json
+++ b/dashboard/src/i18n/locales/zh-CN/features/persona.json
@@ -35,6 +35,7 @@
"mcpServersQuickSelect": "MCP 服务器快速选择",
"searchTools": "搜索工具",
"selectedTools": "已选择的工具",
+ "builtinToolDisabledHint": "暂不支持在这里启用和停用内置工具,请在配置文件中启用和停用工具对应的配置项。",
"noToolsAvailable": "暂无可用工具",
"noToolsFound": "未找到匹配的工具",
"loadingTools": "正在加载工具...",