feat(control-ui): add toggle to hide tool use messages in chat history#19770
feat(control-ui): add toggle to hide tool use messages in chat history#19770aleiby wants to merge 1 commit intoopenclaw:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 169f1fc7a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!props.showToolUse && normalized.role.toLowerCase() === "toolresult") { | ||
| continue; |
There was a problem hiding this comment.
Exclude tool-call assistant messages when hiding tool use
This branch only filters messages whose normalized role equals toolresult, so assistant history entries that encode tool calls as content blocks (for example type: "tool_use"/"tool_call" without a top-level toolCallId) are still kept when the toggle is off. In that case renderGroupedMessage suppresses the tool cards but still renders the group shell, so users see blank chat rows and tool-call messages are not actually hidden for those transcript formats.
Useful? React with 👍 / 👎.
Add a wrench icon toggle button next to the existing brain (thinking) toggle. When toggled off, tool call messages, tool result messages, and inline tool cards are hidden from the chat view. The toggle operates independently of the thinking/reasoning toggle. - Add chatShowToolUse setting to UiSettings (default: true) - Add wrench toggle button in chat controls - Filter tool messages in buildChatItems based on showToolUse - Pass showToolUse through grouped-render to hide tool cards - Add toolUseToggle i18n string
169f1fc to
eb0da72
Compare
|
Closing as duplicate of #20317. If this is incorrect, please contact us. |
When showToolCalls is false, messages containing only tool cards (no text, no images) should not render empty bubbles. Credit: @aleiby via openclaw#20317 (comment) See also: openclaw#19770 Co-authored-by: aleiby
- Add wrench toggle to desktop chat toolbar to show/hide tool calls and tool results independently from the thinking toggle - Add gear icon in the topbar on mobile that opens a dropdown with all chat controls (session selector, thinking, tool calls, focus) - Hide content-header on mobile to maximize vertical chat space - Persist preference in localStorage (default: show tool calls) - Fix CSS load order for mobile override specificity Closes openclaw#12097 fix: suppress empty bubbles when tool cards hidden When showToolCalls is false, messages containing only tool cards (no text, no images) should not render empty bubbles. Credit: @aleiby via openclaw#20317 (comment) See also: openclaw#19770 Co-authored-by: aleiby
- Add wrench toggle to desktop chat toolbar to show/hide tool calls and tool results independently from the thinking toggle - Add gear icon in the topbar on mobile that opens a dropdown with all chat controls (session selector, thinking, tool calls, focus) - Hide content-header on mobile to maximize vertical chat space - Persist preference in localStorage (default: show tool calls) - Fix CSS load order for mobile override specificity Closes openclaw#12097 fix: suppress empty bubbles when tool cards hidden When showToolCalls is false, messages containing only tool cards (no text, no images) should not render empty bubbles. Credit: @aleiby via openclaw#20317 (comment) See also: openclaw#19770 Co-authored-by: aleiby
- Add wrench toggle to desktop chat toolbar to show/hide tool calls and tool results independently from the thinking toggle - Add gear icon in the topbar on mobile that opens a dropdown with all chat controls (session selector, thinking, tool calls, focus) - Hide content-header on mobile to maximize vertical chat space - Persist preference in localStorage (default: show tool calls) - Fix CSS load order for mobile override specificity Closes openclaw#12097 fix: suppress empty bubbles when tool cards hidden When showToolCalls is false, messages containing only tool cards (no text, no images) should not render empty bubbles. Credit: @aleiby via openclaw#20317 (comment) See also: openclaw#19770 Co-authored-by: aleiby
- Add wrench toggle to desktop chat toolbar to show/hide tool calls and tool results independently from the thinking toggle - Add gear icon in the topbar on mobile that opens a dropdown with all chat controls (session selector, thinking, tool calls, focus) - Hide content-header on mobile to maximize vertical chat space - Persist preference in localStorage (default: show tool calls) - Fix CSS load order for mobile override specificity Closes openclaw#12097 fix: suppress empty bubbles when tool cards hidden When showToolCalls is false, messages containing only tool cards (no text, no images) should not render empty bubbles. Credit: @aleiby via openclaw#20317 (comment) See also: openclaw#19770 Co-authored-by: aleiby
- Add wrench toggle to desktop chat toolbar to show/hide tool calls and tool results independently from the thinking toggle - Add gear icon in the topbar on mobile that opens a dropdown with all chat controls (session selector, thinking, tool calls, focus) - Hide content-header on mobile to maximize vertical chat space - Persist preference in localStorage (default: show tool calls) - Fix CSS load order for mobile override specificity Closes openclaw#12097 fix: suppress empty bubbles when tool cards hidden When showToolCalls is false, messages containing only tool cards (no text, no images) should not render empty bubbles. Credit: @aleiby via openclaw#20317 (comment) See also: openclaw#19770 Co-authored-by: aleiby
Summary
Add a dedicated wrench icon toggle button in the Control UI chat controls to hide/show tool use messages (tool calls and tool results) independently of the thinking/reasoning toggle.
Before: Tool use messages were tied to the brain (thinking) toggle — hiding thinking also hid tool results. No way to hide tool clutter while keeping thinking visible, or vice versa.
After: Separate wrench icon toggle next to the brain icon. Each toggle controls its own concern independently:
Changes
ui/src/ui/storage.ts— AddchatShowToolUseboolean setting (default:true)ui/src/i18n/locales/en.ts— AddtoolUseTogglei18n stringui/src/ui/app-render.helpers.ts— Add wrench icon toggle button between brain and focus togglesui/src/ui/app-render.ts— Resolve and passshowToolUsepropui/src/ui/views/chat.ts— AddshowToolUsetoChatProps; filter tool messages inbuildChatItemsui/src/ui/chat/grouped-render.ts— PassshowToolUsethrough render chain; hide standalone tool result cards and inline tool cards when falseTesting
AI-assisted: Claude Opus 4.6
🤖 Tackled with Claude Code