diff --git a/i18n/messages.json b/i18n/messages.json index 3685e2b26..a6a8b2c2d 100644 --- a/i18n/messages.json +++ b/i18n/messages.json @@ -6915,10 +6915,6 @@ "en": "Meta tools", "zh": "元工具" }, - "gui.settings.tools.meta_elsewhere": { - "en": "switched on by the tool-search setting, not here", - "zh": "由工具检索设置控制,不在这里开关" - }, "gui.settings.setup.web_search": { "en": "Web search", "zh": "联网搜索" diff --git a/ui-tui/src/i18n/messages.generated.ts b/ui-tui/src/i18n/messages.generated.ts index cfe3e3a3f..384ccdc54 100644 --- a/ui-tui/src/i18n/messages.generated.ts +++ b/ui-tui/src/i18n/messages.generated.ts @@ -1937,7 +1937,6 @@ export const UI_TEXT: Record> = { 'gui.settings.tools.grp_skills': 'Skills and playbooks', 'gui.settings.tools.grp_memory': 'Memory', 'gui.settings.tools.grp_search': 'Meta tools', - 'gui.settings.tools.meta_elsewhere': 'switched on by the tool-search setting, not here', 'gui.settings.setup.web_search': 'Web search', 'gui.settings.setup.web_fetch': 'Page reading', 'gui.settings.setup.ready': 'On', @@ -3674,7 +3673,6 @@ export const UI_TEXT: Record> = { 'gui.settings.tools.grp_skills': '技能与剧本', 'gui.settings.tools.grp_memory': '记忆', 'gui.settings.tools.grp_search': '元工具', - 'gui.settings.tools.meta_elsewhere': '由工具检索设置控制,不在这里开关', 'gui.settings.setup.web_search': '联网搜索', 'gui.settings.setup.web_fetch': '网页抓取', 'gui.settings.setup.ready': '已开启', diff --git a/ui-web/src/features/settings/pages/Tools.test.tsx b/ui-web/src/features/settings/pages/Tools.test.tsx index 2043332e8..4bb53d366 100644 --- a/ui-web/src/features/settings/pages/Tools.test.tsx +++ b/ui-web/src/features/settings/pages/Tools.test.tsx @@ -53,9 +53,6 @@ describe('tools page', () => { expect(dag.classList.contains('settings-swi-fixed')).toBe(false) expect(TOOL_GROUPS.collab).toContain('cancel_dag') expect(TOOL_GROUPS.search).not.toContain('cancel_dag') - /* The note that says where `tool_search`'s switch really is. Without it the - row reads as a tool that cannot be turned on at all. */ - expect(screen.getByText('gui.settings.tools.meta_elsewhere')).toBeTruthy() /* Eight known tools, none of them meta: read_file, exec, spawn, web_fetch (Jina reads without a key) and cancel_dag are on and unblocked; web_search lacks its key; deep_research and image_generate are switched diff --git a/ui-web/src/features/settings/pages/Tools.tsx b/ui-web/src/features/settings/pages/Tools.tsx index c26a7f8e3..32ecd736f 100644 --- a/ui-web/src/features/settings/pages/Tools.tsx +++ b/ui-web/src/features/settings/pages/Tools.tsx @@ -152,19 +152,10 @@ export function Tools(): JSX.Element { if (!known_) return null const isOn = !meta && wanted(id) const blk = isOn ? blocker(id, raw) : '' - /* The one meta-tool whose switch is a different setting - (`tools.toolSearch.enabled`), so the row says where it is rather than - looking like a tool that cannot be turned on at all. */ - const elsewhere = id === 'tool_search' return ( - {id} - {elsewhere ? {t('gui.settings.tools.meta_elsewhere')} : null} - - } + name={{id}} status={meta ? {t('gui.settings.tools.builtin')} : blk ? {t('gui.settings.tools.setup')} : null} diff --git a/ui-web/src/features/settings/styles.css b/ui-web/src/features/settings/styles.css index 671ce70e9..57e5c78ad 100644 --- a/ui-web/src/features/settings/styles.css +++ b/ui-web/src/features/settings/styles.css @@ -413,6 +413,5 @@ footer {border-top:1px solid var(--line); margin:48px 0 0; padding:18px 0 70px; .settings-xrow.settings-dim .settings-xn {color:var(--muted)} .settings-xname {display:inline-flex; align-items:center; gap:9px; flex:1; min-width:0; font:inherit; color:inherit; background:none; border:0; padding:0; text-align:left; cursor:pointer} .settings-xname .settings-xn {font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap} -.settings-xname .settings-xd {margin-left:9px; font-size:11.5px; color:var(--faint); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0} .settings-xrow.settings-open .settings-chev {transform:rotate(90deg); border-color:var(--amber); color:var(--gold); background:var(--amber-dp)} .settings-lnkico {margin-left:6px; vertical-align:middle}