From 5bd19a2e078cd4c1cbec213ade77c9ce8a17c0da Mon Sep 17 00:00:00 2001 From: Charles Cunningham Date: Tue, 24 Feb 2026 17:23:51 -0800 Subject: [PATCH] Rename asking guidance placeholder in default mode template --- .../models_manager/collaboration_mode_presets.rs | 16 ++++++++++------ .../core/templates/collaboration_mode/default.md | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/codex-rs/core/src/models_manager/collaboration_mode_presets.rs b/codex-rs/core/src/models_manager/collaboration_mode_presets.rs index 23ea1b2278..a9a7321714 100644 --- a/codex-rs/core/src/models_manager/collaboration_mode_presets.rs +++ b/codex-rs/core/src/models_manager/collaboration_mode_presets.rs @@ -8,7 +8,7 @@ const COLLABORATION_MODE_DEFAULT: &str = include_str!("../../templates/collaboration_mode/default.md"); const KNOWN_MODE_NAMES_PLACEHOLDER: &str = "{{KNOWN_MODE_NAMES}}"; const REQUEST_USER_INPUT_AVAILABILITY_PLACEHOLDER: &str = "{{REQUEST_USER_INPUT_AVAILABILITY}}"; -const QUESTION_STRATEGY_PLACEHOLDER: &str = "{{QUESTION_STRATEGY}}"; +const ASKING_QUESTIONS_GUIDANCE_PLACEHOLDER: &str = "{{ASKING_QUESTIONS_GUIDANCE}}"; /// Stores feature flags that control collaboration-mode behavior. /// @@ -61,15 +61,19 @@ fn default_mode_instructions(collaboration_modes_config: CollaborationModesConfi ModeKind::Default, collaboration_modes_config.default_mode_request_user_input, ); - let question_strategy = - question_strategy_message(collaboration_modes_config.default_mode_request_user_input); + let asking_questions_guidance = asking_questions_guidance_message( + collaboration_modes_config.default_mode_request_user_input, + ); COLLABORATION_MODE_DEFAULT .replace(KNOWN_MODE_NAMES_PLACEHOLDER, &known_mode_names) .replace( REQUEST_USER_INPUT_AVAILABILITY_PLACEHOLDER, &request_user_input_availability, ) - .replace(QUESTION_STRATEGY_PLACEHOLDER, &question_strategy) + .replace( + ASKING_QUESTIONS_GUIDANCE_PLACEHOLDER, + &asking_questions_guidance, + ) } fn format_mode_names(modes: &[ModeKind]) -> String { @@ -98,7 +102,7 @@ fn request_user_input_availability_message( } } -fn question_strategy_message(default_mode_request_user_input: bool) -> String { +fn asking_questions_guidance_message(default_mode_request_user_input: bool) -> String { if default_mode_request_user_input { "In Default mode, strongly prefer making reasonable assumptions and executing the user's request rather than stopping to ask questions. If you absolutely must ask a question because the answer cannot be discovered from local context and a reasonable assumption would be risky, prefer using the `request_user_input` tool rather than writing a multiple choice question as a textual assistant message. Never write a multiple choice question as a textual assistant message.".to_string() } else { @@ -133,7 +137,7 @@ mod tests { assert!(!default_instructions.contains(KNOWN_MODE_NAMES_PLACEHOLDER)); assert!(!default_instructions.contains(REQUEST_USER_INPUT_AVAILABILITY_PLACEHOLDER)); - assert!(!default_instructions.contains(QUESTION_STRATEGY_PLACEHOLDER)); + assert!(!default_instructions.contains(ASKING_QUESTIONS_GUIDANCE_PLACEHOLDER)); let known_mode_names = format_mode_names(&TUI_VISIBLE_COLLABORATION_MODES); let expected_snippet = format!("Known mode names are {known_mode_names}."); diff --git a/codex-rs/core/templates/collaboration_mode/default.md b/codex-rs/core/templates/collaboration_mode/default.md index 6ff434a756..ff00857c6d 100644 --- a/codex-rs/core/templates/collaboration_mode/default.md +++ b/codex-rs/core/templates/collaboration_mode/default.md @@ -8,4 +8,4 @@ Your active mode changes only when new developer instructions with a different ` {{REQUEST_USER_INPUT_AVAILABILITY}} -{{QUESTION_STRATEGY}} +{{ASKING_QUESTIONS_GUIDANCE}}