feat(tui): add permission prompt behavior config#29104
Open
tkemperman wants to merge 1 commit into
Open
Conversation
- Add tui.json permission_prompt.default_response so users can choose the default permission response. - Add tui.json permission_prompt.confirmation so second confirmations can be disabled by default or required for specific responses, permissions, and patterns. - Preserve existing behavior when permission_prompt.confirmation is omitted by continuing to confirm Allow always. - Update the TUI permission prompt to apply the configured default response and confirmation rules. - Document the new TUI settings and add unit coverage for default, response-level, and pattern-level confirmation behavior.
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.
Issue for this PR
Closes #29105
Addresses #19528
Type of change
What does this PR do?
permission_prompt.default_responsetotui.jsonso users can choose which permission response is selected by default (once,always, orreject).permission_prompt.confirmationto control whether selecting a permission response opens a second confirmation dialog.bashcommands matchingrm *.permission_prompt.confirmationis omitted:Allow alwaysstill requires a second confirmation.How did you verify your code works?
PATH="$HOME/.bun/bin:$PATH" bun test test/cli/tui/permission-prompt.test.tsinpackages/opencode.PATH="$HOME/.bun/bin:$PATH" bun typecheckinpackages/opencode.bun turbo typechecksuccessfully across the workspace.default_response: "always",confirmation.default: "never", andconfirmation.permission.bash["rm *"]: "always".Checklist