-
Notifications
You must be signed in to change notification settings - Fork 6.4k
whitelist command prefix integration in core and tui #7033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: pr7032
Are you sure you want to change the base?
Conversation
683bc5f to
1273f94
Compare
90204c3 to
67afce9
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
| commands: &[Vec<String>], | ||
| features: &Features, | ||
| ) -> Option<Vec<String>> { | ||
| if features.enabled(Feature::ExecPolicy) && commands.len() == 1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love the solution I came up with here w.r.t only persisting allow prefix if ExecPolicy is enabled. I think a better solution would be to change the way we store Policy in session state. We should store either an enum indicating whether ExecPolicy is enabled or store Policy as an optional. However, I think this is fit for a followup PR
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
this PR enables TUI to approve commands and add their prefixes to an allowlist:

note: we only show the option to whitelist the command when
git add -A && git commit -m 'hello world')