mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-14 03:30:19 +00:00
✨ feat(tools): show app-fixed tools in the chat-input Pinned section (#15509)
* ✨ feat(tools): show app-fixed tools in the chat-input Pinned section Surface always-on, runtime-owned tools (lobe-agent + always-on infra) read-only at the top of the Tools popover "Pinned" group, so users can see what the app keeps active for every conversation. These have no toggle — a Pin indicator with a hint replaces the per-tool policy menu. - builtin-tools: add `fixedDisplayToolIds` ([lobe-agent, ...alwaysOnToolIds]) - builtin selectors: add `fixedDisplayMetaList` (reads hidden tools by id) - useControls: render read-only fixed items, prepend to Pinned, fold into counts - i18n: add `tools.activation.fixed.hint` + `tools.builtins.lobe-agent.*` Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * 🐛 fix(tools): make lobe-agent actually always-on; gate fixed display to runtime The Pinned section was rendering tools that aren't enabled every turn: - lobe-agent was only enabled when injected into plugins/runtime ids (it has no rule in the engine, so it defaulted to disabled) — showing it as "always on" was a UI lie. - manual skill-activate mode strips manualModeExcludeToolIds (activator, skill-store) from the defaults, so they're off — but they still showed as fixed. Fixes: - Add lobe-agent to alwaysOnToolIds so its core capabilities (plan/todo, sub-agent dispatch, visual-media fallback) are genuinely on every agent-mode turn. Chat mode still drops alwaysOn entirely. - Derive fixedDisplayToolIds from alwaysOnToolIds (single source of truth, no drift). - Make fixedDisplayMetaList mode-aware: drop manualModeExcludeToolIds in manual mode so the Pinned list matches what the engine actually enables. - Update engine tests that asserted the old "lobe-agent off by default" behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ♻️ refactor(tools): drop fixedDisplayToolIds alias, use alwaysOnToolIds directly fixedDisplayToolIds was just `= alwaysOnToolIds`; collapse it. The selector now reads alwaysOnToolIds directly and still applies the manual-mode exclusion. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1014,6 +1014,7 @@
|
||||
"tab.usage": "Usage",
|
||||
"tools.activation.auto": "Auto",
|
||||
"tools.activation.auto.desc": "Smart",
|
||||
"tools.activation.fixed.hint": "Always on — managed by the app and can’t be turned off",
|
||||
"tools.activation.pinned": "Pinned",
|
||||
"tools.activation.pinned.desc": "Always On",
|
||||
"tools.add": "Add Skill",
|
||||
@@ -1033,6 +1034,8 @@
|
||||
"tools.builtins.lobe-agent-documents.title": "Documents",
|
||||
"tools.builtins.lobe-agent-management.description": "Create, manage, and orchestrate AI agents",
|
||||
"tools.builtins.lobe-agent-management.title": "Agent Management",
|
||||
"tools.builtins.lobe-agent.description": "Built-in Lobe Agent capabilities: plan and todo management, sub-agent dispatch, and visual media analysis",
|
||||
"tools.builtins.lobe-agent.title": "Lobe Agent",
|
||||
"tools.builtins.lobe-artifacts.description": "Generate and preview interactive UI components and visualizations",
|
||||
"tools.builtins.lobe-artifacts.readme": "Generate and live-preview interactive UI components, data visualizations, charts, SVG graphics, and web applications. Create rich visual content that users can interact with directly.",
|
||||
"tools.builtins.lobe-artifacts.title": "Artifacts",
|
||||
|
||||
@@ -1015,6 +1015,7 @@
|
||||
"tab.usage": "用量",
|
||||
"tools.activation.auto": "自动",
|
||||
"tools.activation.auto.desc": "智能调用",
|
||||
"tools.activation.fixed.hint": "由应用强制开启,始终可用,无法关闭",
|
||||
"tools.activation.pinned": "固定启用",
|
||||
"tools.activation.pinned.desc": "始终注入",
|
||||
"tools.add": "集成技能",
|
||||
@@ -1034,6 +1035,8 @@
|
||||
"tools.builtins.lobe-agent-documents.title": "文档",
|
||||
"tools.builtins.lobe-agent-management.description": "创建、管理并编排 AI 助手",
|
||||
"tools.builtins.lobe-agent-management.title": "助手管理",
|
||||
"tools.builtins.lobe-agent.description": "内置 Lobe Agent 能力:计划与待办管理、子助手调度、视觉媒体分析",
|
||||
"tools.builtins.lobe-agent.title": "Lobe Agent",
|
||||
"tools.builtins.lobe-artifacts.description": "生成并预览交互式 UI 组件和可视化内容",
|
||||
"tools.builtins.lobe-artifacts.readme": "生成并实时预览交互式 UI 组件、数据可视化、图表、SVG 图形和 Web 应用。创建用户可直接交互的丰富可视化内容。",
|
||||
"tools.builtins.lobe-artifacts.title": "Artifacts",
|
||||
|
||||
Reference in New Issue
Block a user