Skip to content

fix(dashboard): remove dedupe toogle#4991

Closed
letr007 wants to merge 1 commit intoAstrBotDevs:masterfrom
letr007:fix/4971
Closed

fix(dashboard): remove dedupe toogle#4991
letr007 wants to merge 1 commit intoAstrBotDevs:masterfrom
letr007:fix/4971

Conversation

@letr007
Copy link
Contributor

@letr007 letr007 commented Feb 9, 2026

fix #4971

Modifications / 改动点

  • dashboard/src/views/SubAgentPage.vue:移除 SubAgent 页面中的“主 LLM 去重重复工具(dedupe)”开关,避免让用户误以为启用编排后主 LLM 仍保留并直接挂载大量工具。

  • dashboard/src/i18n/locales/en-US/features/subagent.json:修正英文文案,明确启用后主 LLM 仅通过 transfer_to_* 进行委派,不再直接挂载 persona/全局工具,由 SubAgent 负责工具调用与结果整理。

  • dashboard/src/i18n/locales/zh-CN/features/subagent.json:同步修正中文文案,与实际行为保持一致,避免用户误解。

  • This is NOT a breaking change. / 这不是一个破坏性变更。

Screenshots or Test Results / 运行截图或测试结果

image

Checklist / 检查清单

  • 😊 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。/ If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
  • 👀 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。/ My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
  • 🤓 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到了 requirements.txtpyproject.toml 文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
  • 😮 我的更改没有引入恶意代码。/ My changes do not introduce malicious code.

Summary by Sourcery

移除用于对主 LLM 工具去重的 SubAgent 仪表板开关,并在中英文本地化中对齐子代理(SubAgent)的描述,使其与实际的委派行为保持一致。

Bug Fixes:

  • 从 SubAgent 设置中移除具有误导性的去重开关,以避免用户对主 LLM 工具挂载行为产生困惑。

Enhancements:

  • 在英文和中文文案中澄清 SubAgent 行为:当其被启用时,主 LLM 会通过 transfer_to_* 进行委派,工具的实际使用由 SubAgents 处理。
Original summary in English

Summary by Sourcery

Remove the SubAgent dashboard toggle for deduplicating main LLM tools and align subagent descriptions with the actual delegation behavior in both English and Chinese locales.

Bug Fixes:

  • Eliminate the misleading deduplication toggle from the SubAgent settings to prevent confusion about main LLM tool mounting behavior.

Enhancements:

  • Clarify subagent behavior in English and Chinese copy to reflect that, when enabled, the main LLM delegates via transfer_to_* and tool usage is handled by SubAgents.

@auto-assign auto-assign bot requested review from Raven95676 and Soulter February 9, 2026 08:22
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 9, 2026
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我在这里给出了一些总体反馈:

  • 由于 cfg.remove_main_duplicate_tools 不再在 UI 中暴露,建议从 state/config 模型或后端中移除或重构对该字段的残留使用,以避免“死配置”和潜在困惑。
  • 随着去重开关被移除,如果相应的 i18n 条目(例如 switches.dedupe 以及相关文案)在代码中已经不再被引用,可以考虑一并删除,以保持多语言文件精简、便于维护。
供 AI 代理使用的提示词
Please address the comments from this code review:

## Overall Comments
- Since `cfg.remove_main_duplicate_tools` is no longer exposed in the UI, consider removing or refactoring any remaining usages of this field in the state/config models or backend to avoid dead configuration and confusion.
- With the dedupe switch removed, you can likely drop the corresponding i18n entries (e.g., `switches.dedupe` and related text) if they are no longer referenced anywhere, to keep the locale files lean and easier to maintain.

Sourcery 对开源项目免费——如果你觉得我们的评审有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈持续改进代码评审质量。
Original comment in English

Hey - I've left some high level feedback:

  • Since cfg.remove_main_duplicate_tools is no longer exposed in the UI, consider removing or refactoring any remaining usages of this field in the state/config models or backend to avoid dead configuration and confusion.
  • With the dedupe switch removed, you can likely drop the corresponding i18n entries (e.g., switches.dedupe and related text) if they are no longer referenced anywhere, to keep the locale files lean and easier to maintain.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since `cfg.remove_main_duplicate_tools` is no longer exposed in the UI, consider removing or refactoring any remaining usages of this field in the state/config models or backend to avoid dead configuration and confusion.
- With the dedupe switch removed, you can likely drop the corresponding i18n entries (e.g., `switches.dedupe` and related text) if they are no longer referenced anywhere, to keep the locale files lean and easier to maintain.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@dosubot
Copy link

dosubot bot commented Feb 9, 2026

Related Documentation

1 document(s) may need updating based on files changed in this PR:

AstrBotTeam's Space

pr4697的改动
View Suggested Changes
@@ -24,7 +24,7 @@
 这样,主代理既可以自主处理,也可以灵活委派任务。
 
 #### 配置说明
-SubAgent 的定义与 Persona 配置一致,需在配置文件中指定 tools、skills、name、description 等。主代理可根据配置保留自身工具集,并自动包含 handoff 工具(如 transfer_to_*)。通过 `remove_main_duplicate_tools` 配置项,可选择是否从主代理工具集中移除与子代理重复的工具。工具分配可通过 UI 或配置文件完成。
+SubAgent 的定义与 Persona 配置一致,需在配置文件中指定 tools、skills、name、description 等。主代理在未启用 SubAgent 编排时,可直接挂载自身工具集(按 persona 规则,默认全部),并直接调用工具。启用 SubAgent 编排后,主代理仅挂载 transfer_to_* 委派工具,不再直接挂载 persona/全局工具;由 SubAgent 负责工具调用与结果整理。工具分配可通过 UI 或配置文件完成。
 
 ### 2. FutureTask(定时任务)机制
 
@@ -96,9 +96,9 @@
 - Persona 选择与工具分配
 - 配置持久化
 - 供应商类型选择:现在支持在“选择供应商”下拉菜单中选择 `chat_completion` 和 `agent_runner` 类型,便于根据不同需求配置子代理的执行方式。
-- 页面副标题已更新为:“主 LLM 可直接使用自身工具,也可通过 handoff 分派给各个 SubAgent。”
+- 页面副标题已更新为:“主 LLM 负责聊天与委派(transfer_to_*),工具挂载在各个 SubAgent 上。”
 
-主代理和子代理的工具分配逻辑在 UI 中有清晰展示,支持灵活配置和去重。
+主代理和子代理的工具分配逻辑在 UI 中有清晰展示,支持灵活配置。
 
 #### 定时任务管理
 新增 Cron Job 管理页面(CronJobPage.vue),支持:

[Accept] [Decline]

Note: You must be authenticated to accept/decline updates.

How did I do? Any feedback?  Join Discord

@letr007 letr007 closed this Feb 9, 2026
@dosubot dosubot bot added the area:webui The bug / feature is about webui(dashboard) of astrbot. label Feb 9, 2026
@letr007
Copy link
Contributor Author

letr007 commented Feb 9, 2026

已有 #4990 修复,此PR重复

@letr007 letr007 deleted the fix/4971 branch February 9, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webui The bug / feature is about webui(dashboard) of astrbot. size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] SubAgent 编排启用时主 LLM 可用工具与说明描述不符

1 participant