[PR #21496] [CLOSED] feat: add "Show Tool Call Output" interface toggle #64960

Closed
opened 2026-05-06 10:42:12 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/21496
Author: @Classic298
Created: 2/16/2026
Status: Closed

Base: devHead: tool-UI


📝 Commits (2)

  • a5d1560 feat: add "Show Tool Call Output" interface toggle
  • ebb4d54 Update ToolCallDisplay.svelte

📊 Changes

4 files changed (+84 additions, -7 deletions)

View changed files

📝 src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte (+1 -0)
📝 src/lib/components/chat/Settings/Interface.svelte (+21 -0)
📝 src/lib/components/common/ToolCallDisplay.svelte (+61 -7)
📝 src/lib/stores/index.ts (+1 -0)

📄 Description

Add a new per-user interface toggle under Settings > Interface that controls how tool calls are displayed when expanded in the chat UI. The toggle defaults to on, preserving the existing behavior. When turned off:

  • The Output section (raw JSON result) is completely hidden
  • The Input section replaces the JSON code block with a formatted key-value list, converting parameter names from snake_case/camelCase to readable labels (e.g. "search_query" becomes "Search Query")
  • Falls back to raw JSON display if arguments cannot be parsed This is a frontend-only change. Tool call data is still sent to models and stored in chat history unchanged — only the visual rendering is affected.
    Files changed:
  • src/lib/stores/index.ts Added showToolCallOutput to the Settings type definition.
  • src/lib/components/chat/Settings/Interface.svelte Added the toggle variable, onMount initialization from saved settings, and the toggle UI row in the Chat section after "Always Expand Details".
  • src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte Passes the showToolCallOutput setting as a prop to ToolCallDisplay.
  • src/lib/components/common/ToolCallDisplay.svelte Added showToolCallOutput prop, formatKey helper for converting parameter names to human-readable labels, and tryParseArgs helper for safely parsing tool arguments. Conditionally renders either the original JSON code blocks or the formatted key-value display based on the setting.

1. Would fix: #21440
2. Relates to: https://github.com/open-webui/open-webui/issues/20598
3. Improves: #20878

image

On by default for backwards compatibility

image

If toggled on - all tool output no longer gets shown - and tool input gets shown in a key: value format instead of JSON

This should also really help this issue here with hard performance issues with many codeblocks and long response outputs: https://github.com/open-webui/open-webui/discussions/20878

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/21496 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 2/16/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `tool-UI` --- ### 📝 Commits (2) - [`a5d1560`](https://github.com/open-webui/open-webui/commit/a5d1560797ebfddec20af722e9b732e291253fd5) feat: add "Show Tool Call Output" interface toggle - [`ebb4d54`](https://github.com/open-webui/open-webui/commit/ebb4d54d456c9bda229089aadf30c50cd94d8e80) Update ToolCallDisplay.svelte ### 📊 Changes **4 files changed** (+84 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte` (+1 -0) 📝 `src/lib/components/chat/Settings/Interface.svelte` (+21 -0) 📝 `src/lib/components/common/ToolCallDisplay.svelte` (+61 -7) 📝 `src/lib/stores/index.ts` (+1 -0) </details> ### 📄 Description Add a new per-user interface toggle under Settings > Interface that controls how tool calls are displayed when expanded in the chat UI. The toggle defaults to on, preserving the existing behavior. When turned off: - The Output section (raw JSON result) is completely hidden - The Input section replaces the JSON code block with a formatted key-value list, converting parameter names from snake_case/camelCase to readable labels (e.g. "search_query" becomes "Search Query") - Falls back to raw JSON display if arguments cannot be parsed This is a frontend-only change. Tool call data is still sent to models and stored in chat history unchanged — only the visual rendering is affected. Files changed: - src/lib/stores/index.ts Added showToolCallOutput to the Settings type definition. - src/lib/components/chat/Settings/Interface.svelte Added the toggle variable, onMount initialization from saved settings, and the toggle UI row in the Chat section after "Always Expand Details". - src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte Passes the showToolCallOutput setting as a prop to ToolCallDisplay. - src/lib/components/common/ToolCallDisplay.svelte Added showToolCallOutput prop, formatKey helper for converting parameter names to human-readable labels, and tryParseArgs helper for safely parsing tool arguments. Conditionally renders either the original JSON code blocks or the formatted key-value display based on the setting. **1. Would fix: #21440 2. Relates to: https://github.com/open-webui/open-webui/issues/20598 3. Improves: #20878** <img width="1126" height="40" alt="image" src="https://github.com/user-attachments/assets/dd7105af-d61e-4811-a014-3ba3cc3396be" /> On by default for backwards compatibility <img width="1075" height="290" alt="image" src="https://github.com/user-attachments/assets/4fe4f0da-f709-440a-b4b3-8f581a794c98" /> If toggled on - all tool output no longer gets shown - and tool input gets shown in a key: value format instead of JSON <ins>**This should also really help this issue here with hard performance issues with many codeblocks and long response outputs: https://github.com/open-webui/open-webui/discussions/20878**</ins> ### Contributor License Agreement <!-- 🚨 DO NOT DELETE THE TEXT BELOW 🚨 Keep the "Contributor License Agreement" confirmation text intact. Deleting it will trigger the CLA-Bot to INVALIDATE your PR. --> By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-06 10:42:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#64960