From 0fbcf6600c37f779b06287720a580eaadc1ea32a Mon Sep 17 00:00:00 2001 From: Felipe Coury Date: Sun, 12 Apr 2026 19:47:24 -0300 Subject: [PATCH] fix: use accepted spelling for preselected Replace `pre-selected` with `preselected` in permission prompt and test text so the codespell CI check accepts the branch wording. --- codex-rs/protocol/src/models.rs | 2 +- codex-rs/tools/src/local_tool.rs | 2 +- codex-rs/tui/src/chatwidget/tests/approval_requests.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/codex-rs/protocol/src/models.rs b/codex-rs/protocol/src/models.rs index 27be020b4d..1b8edc7cc7 100644 --- a/codex-rs/protocol/src/models.rs +++ b/codex-rs/protocol/src/models.rs @@ -640,7 +640,7 @@ fn request_permissions_tool_prompt_section() -> &'static str { } fn request_permission_preset_tool_prompt_section() -> &'static str { - "# request_permission_preset Tool\n\nThe built-in `request_permission_preset` tool is available in this session. Invoke it immediately when the user asks conversationally to change the broad sandboxing, approval, or permission mode, for example \"make this session full access\", \"switch to full access\", \"make the session read-only\", or \"use guardian approvals\". The tool opens the permission-mode picker with the requested preset pre-selected; the session only changes if the user selects a mode there. Do not claim the mode changed until the tool returns an accepted decision. Use `request_permissions` instead for named paths or narrow filesystem/network grants; never use the preset picker for requests like \"allow writing to ~/Downloads\"." + "# request_permission_preset Tool\n\nThe built-in `request_permission_preset` tool is available in this session. Invoke it immediately when the user asks conversationally to change the broad sandboxing, approval, or permission mode, for example \"make this session full access\", \"switch to full access\", \"make the session read-only\", or \"use guardian approvals\". The tool opens the permission-mode picker with the requested preset preselected; the session only changes if the user selects a mode there. Do not claim the mode changed until the tool returns an accepted decision. Use `request_permissions` instead for named paths or narrow filesystem/network grants; never use the preset picker for requests like \"allow writing to ~/Downloads\"." } fn granular_instructions( diff --git a/codex-rs/tools/src/local_tool.rs b/codex-rs/tools/src/local_tool.rs index a49ce62d4d..d0e03e0543 100644 --- a/codex-rs/tools/src/local_tool.rs +++ b/codex-rs/tools/src/local_tool.rs @@ -341,7 +341,7 @@ pub fn create_request_permission_preset_tool(available_preset_ids: Vec<&'static } pub fn request_permission_preset_tool_description() -> String { - "Open the permission-mode picker with a built-in preset such as Default or Full Access pre-selected. Use this immediately when the user says things like \"make this session full access\", \"switch to read-only\", or otherwise conversationally asks to change sandboxing, approval, or permission mode. The session only changes if the user selects a permission mode in the picker." + "Open the permission-mode picker with a built-in preset such as Default or Full Access preselected. Use this immediately when the user says things like \"make this session full access\", \"switch to read-only\", or otherwise conversationally asks to change sandboxing, approval, or permission mode. The session only changes if the user selects a permission mode in the picker." .to_string() } diff --git a/codex-rs/tui/src/chatwidget/tests/approval_requests.rs b/codex-rs/tui/src/chatwidget/tests/approval_requests.rs index fd3813bc03..41e8899b2d 100644 --- a/codex-rs/tui/src/chatwidget/tests/approval_requests.rs +++ b/codex-rs/tui/src/chatwidget/tests/approval_requests.rs @@ -92,7 +92,7 @@ async fn permission_preset_request_opens_permissions_picker_with_requested_prese popup .lines() .any(|line| line.contains('›') && line.contains("Full Access")), - "expected Full Access to be pre-selected in the permissions picker: {popup}" + "expected Full Access to be preselected in the permissions picker: {popup}" ); assert_snapshot!("permission_preset_request_picker", popup);