feat(desktop): add toggle for tool call visibility#3733
Open
SuMuxi66 wants to merge 1 commit into
Open
Conversation
547c4b8 to
4478106
Compare
Owner
|
main-v2 absorbed a large batch of merges today and this branch now conflicts. Could you rebase onto the latest main-v2? The change itself is still wanted — once it's green I'll review promptly (fork CI gets approved as soon as you push). |
Owner
|
Reviewed — clean, well-scoped, tests included, and the bridge/mock contract kept in sync. Two things: please rebase onto current main-v2 (today's merge batch made it conflict), and heads-up that #3913's display modes will overlap this toggle in SettingsPanel/Transcript — you're first in line, so just rebase and I'll merge. |
Add a global setting to control whether tool call blocks are shown in the chat area. The toggle defaults to on (show), persists to the desktop TOML config, and only affects UI rendering. Functional tool UI (todo_write, exit_plan_mode) remains visible regardless of the setting. Closes: esengine#3710
4478106 to
905da5e
Compare
Contributor
Author
|
已经好了 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3710
新增一个桌面端设置项,用来控制在对话区是否渲染普通的工具调用块。
行为
ToolCard块。todo_write(任务进度面板)、exit_plan_mode(计划确认/退出弹窗)等功能性 UI 仍正常显示。实现要点
[desktop].show_tool_calls用户配置项(仅 UI 用途,默认true)。app.SetShowToolCalls(bool)Wails 绑定,走applyConfigOnly持久化。internal/config/render.go的[desktop]段落中渲染show_tool_calls字段,确保显式true/false都能正确写盘与读回。Transcript组件新增showToolCallsprop;两处case "tool":在原有parentId/todo_write/exit_plan_mode早退之后,新增if (!showToolCalls) break;。SettingsPanel.GeneralSection新增"显示工具调用"分段开关(开启 / 关闭),点击时先做乐观更新(按钮高亮立即切换),再派发持久化调用。App.tsx在启动时读取一次持久化的showToolCalls并传给<Transcript>,用户未打开设置面板也能立即生效。TestDesktopShowToolCallsRoundTrip,覆盖nil默认值 + 显式true/false的存盘回读。验证
git diff --check(无冲突标记)cd desktop && go build -o nul ./...(exit 0)go test ./internal/config/(含新测试全部通过)wails generate module(完成)cd desktop/frontend && npx tsc --noEmit(exit 0)手工验收
todo_write任务进度面板、exit_plan_mode触发的审批弹窗均正常显示。