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.
This commit is contained in:
Felipe Coury
2026-04-12 19:47:24 -03:00
parent 5e1802f77f
commit 0fbcf6600c
3 changed files with 3 additions and 3 deletions

View File

@@ -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(

View File

@@ -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()
}

View File

@@ -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);