Skip to content

feat(control-ui): add toggle to hide tool use messages in chat history#19770

Closed
aleiby wants to merge 1 commit intoopenclaw:mainfrom
aleiby:feat/tool-use-toggle
Closed

feat(control-ui): add toggle to hide tool use messages in chat history#19770
aleiby wants to merge 1 commit intoopenclaw:mainfrom
aleiby:feat/tool-use-toggle

Conversation

@aleiby
Copy link
Copy Markdown

@aleiby aleiby commented Feb 18, 2026

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:

  • Brain toggle → thinking/reasoning blocks
  • Wrench toggle → tool call messages, tool result messages, inline tool cards
Screenshot 2026-02-18 at 8 51 59 AM

Changes

  • ui/src/ui/storage.ts — Add chatShowToolUse boolean setting (default: true)
  • ui/src/i18n/locales/en.ts — Add toolUseToggle i18n string
  • ui/src/ui/app-render.helpers.ts — Add wrench icon toggle button between brain and focus toggles
  • ui/src/ui/app-render.ts — Resolve and pass showToolUse prop
  • ui/src/ui/views/chat.ts — Add showToolUse to ChatProps; filter tool messages in buildChatItems
  • ui/src/ui/chat/grouped-render.ts — Pass showToolUse through render chain; hide standalone tool result cards and inline tool cards when false
  • Test files updated to include new setting

Testing

  1. Open Control UI chat
  2. Verify wrench icon toggle appears between brain and focus toggles
  3. Toggle wrench OFF → tool call/result messages and tool cards disappear
  4. Toggle wrench ON → tool messages reappear
  5. Verify brain toggle still controls thinking/reasoning independently
  6. Verify setting persists across page refreshes (localStorage)

AI-assisted: Claude Opus 4.6


🤖 Tackled with Claude Code

@aleiby aleiby marked this pull request as ready for review February 18, 2026 04:44
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +509 to 510
if (!props.showToolUse && normalized.role.toLowerCase() === "toolresult") {
continue;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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
@sebslight
Copy link
Copy Markdown
Member

Closing as duplicate of #20317. If this is incorrect, please contact us.

@sebslight sebslight closed this Feb 20, 2026
nmccready-tars pushed a commit to brickhouse-tech/openclaw that referenced this pull request Feb 20, 2026
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
nmccready-tars pushed a commit to brickhouse-tech/openclaw that referenced this pull request Feb 21, 2026
- 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
nmccready-tars pushed a commit to brickhouse-tech/openclaw that referenced this pull request Feb 22, 2026
- 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
nmccready-tars pushed a commit to brickhouse-tech/openclaw that referenced this pull request Mar 2, 2026
- 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
nmccready-tars pushed a commit to brickhouse-tech/openclaw that referenced this pull request Mar 7, 2026
- 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
nmccready-tars pushed a commit to brickhouse-tech/openclaw that referenced this pull request Mar 14, 2026
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants