fix(acp): show command in permission dialog title#32751
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
The following comment was made by an LLM, it may be inaccurate: I found one potentially related PR that you should be aware of: PR #28921:
The current PR #32751 is specifically addressing a gap left by PR #32304 where the permission dialog title wasn't showing the command string. PR #28921 from earlier might have different or overlapping approaches to the same problem area that are worth reviewing to ensure consistency. |
|
Redundant with #28921 |
Issue for this PR
Closes #
Type of change
What does this PR do?
Make bash command visible in permission dialog in ACP mode.
Context: PR #32304 (
fix(acp): show shell command in ACP tool calls) fixed this for the running state but not the permission dialog. This change closes that gap.When OpenCode requests permission via ACP (e.g. in Zed), the dialog title is `bash` instead of the command string.
Root cause:
acp/permission.tssendstitle: permission.permission("bash") to Zed'srequestPermissioncall. The command string is only available asrawInput, which Zed renders after user response.Fix
Add `permissionTitle()` to extract `metadata.command` (or `metadata.cmd`) for shell tools, so the dialog shows the command string in the approval prompt.
This mirrors the `toolTitle()` logic in `tool.ts` for running/completed tool call updates (landed in #32304).
How did you verify your code works?
Running it locally as ACP in Zed editor (v1.7.2)
Checklist