mirror of
https://github.com/openai/codex.git
synced 2026-10-24 18:18:41 +00:00
Support catalog templates for approved command prefixes (#55366)
## What changed
Add `approved_prefixes` to catalog permission messages, with `{{ approved_prefixes }}` substitution for the approved command list. An empty template suppresses the section; missing or null values retain the bundled template.
For `on-request` approvals, append an explicitly supplied prefix template even when the catalog also supplies approval instructions. Use the template for bundled `on-request` and granular approval instructions as well.
## Testing
Extend the remote model catalog integration test to cover custom prefix rendering alongside catalog approval instructions and suppression with an empty template.
GitOrigin-RevId: 82dd6f83caa56cab0a2f6343bf912efe2cb97d64
This commit is contained in:
@@ -268,6 +268,7 @@ fn permissions_state(
|
||||
danger_full_access: Some("Full access.".to_string()),
|
||||
workspace_write: Some("Workspace write.".to_string()),
|
||||
read_only: Some("Read only.".to_string()),
|
||||
approved_prefixes: None,
|
||||
};
|
||||
let mut model = model_info_from_slug("test-model");
|
||||
model.model_messages = Some(ModelMessages {
|
||||
|
||||
Reference in New Issue
Block a user