[PR #12482] Showing tool call arguments in TUI tool approval request #14236

Closed
opened 2026-02-16 18:19:02 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12482

State: closed
Merged: No


What does this PR do?

Please provide a description of the issue (if there is one), the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the pr.

Tool call arguments were not always very apparent in tool call approval requests through the TUI. This causes issues, as there are times when the arguments of the tool call are important for the context of if they should be approved or not.

While this information was sometimes provided in-line of the chat for primary agents, I found the subagent tool calls were completely blind in this regard. Also, it is a better UX if the user is able to see it presented in the approval selection UI.

Code is simple. Made an improved renderer for tool call args, truncating them if they are too long (or there are too many). On fullscreen, we do not do the truncation.

Had to pull out the expanded logic to the parent function in order to support this, but since this is solely a local component it is very low impact.

How did you verify your code works?

Ran the TUI and tried MCP tool calls with various different datatypes. Ensured existing tool calls (e.g. read, write) were not impacted.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12482 **State:** closed **Merged:** No --- ### What does this PR do? Please provide a description of the issue (if there is one), the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the pr. Tool call arguments were not always very apparent in tool call approval requests through the TUI. This causes issues, as there are times when the arguments of the tool call are important for the context of if they should be approved or not. While this information was sometimes provided in-line of the chat for primary agents, I found the subagent tool calls were completely blind in this regard. Also, it is a better UX if the user is able to see it presented in the approval selection UI. Code is simple. Made an improved renderer for tool call args, truncating them if they are too long (or there are too many). On fullscreen, we do not do the truncation. Had to pull out the expanded logic to the parent function in order to support this, but since this is solely a local component it is very low impact. ### How did you verify your code works? Ran the TUI and tried MCP tool calls with various different datatypes. Ensured existing tool calls (e.g. read, write) were not impacted.
yindo added the pull-request label 2026-02-16 18:19:02 -05:00
yindo closed this issue 2026-02-16 18:19:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14236