Repository navigation
feat(ui): show the full tool request in an approval panel - #47
Merged
Merged
Conversation
Approval requests were a single transcript line with the policy reason joined to the arguments, and the status line cut long commands. Add a reason field to ApprovalRequired and render requests in a panel above the input that wraps the full command. Give each palette color one role so violet no longer marks every element.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Transcript lines dropped their line-level style when merged with the role bullet, so code and diff colors never showed. Streamed text before a tool call was discarded, and text before a denied approval was glued to the next reply. Flush it to the transcript instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tool approval is the one moment the agent waits for a person, but the request was hard to read. It showed as one transcript line with the policy reason joined to the arguments by a semicolon. The status line cut long commands. The input box only said
Approve tool? y / N.Approval requests now open a panel above the input. The panel shows the tool name, the full arguments, the policy reason on its own
whyline, and the keys:yrun once,ndeny,escstop turn. Long commands wrap inside the panel and are not cut. The transcript records only the answer. A denial shows in red with the denied arguments.The palette also gives each color one job. Before, one violet filled 5 of the 9 palette names.
The new colors are named ANSI colors, so they follow the user's terminal theme.
Real screen captures showed two older bugs, and this PR fixes them too:
…confirm it.## Finding). Both now go to the transcript before the tool event.Key behavior does not change:
nand Enter deny, and Esc stops the turn. The approval event now carriesreasonas a separate field.agent.rsno longer joins it intoargs_summary.Validation:
cargo fmt -- --checkcargo clippy --all-targets -- -D warningscargo test: 208 tests passed, including new tests for the approval panel, the transcript viewport, diff colors, and streamed text around tool eventsTestBackendrender at 96×24, not kept in the branch: a longcurlcommand wraps inside the panel/model, the approval panel, and the reply after a denial. The tools ran on a sample workspace.bun run testandbun run build, for the docs changeCloud providers were not called.