mirror of
https://github.com/openai/codex.git
synced 2026-09-05 15:18:41 +00:00
prompt change
This commit is contained in:
@@ -1175,7 +1175,7 @@ async fn turn_start_uses_thread_feature_overrides_for_request_user_input_tool_de
|
||||
|
||||
let request = response_mock.single_request();
|
||||
let payload_text = request.body_json().to_string();
|
||||
assert!(payload_text.contains("This tool is only available in Default or Plan mode."));
|
||||
assert!(payload_text.contains("This tool is only available in Default or Plan mode. In Default mode, this tool is only available for artifact creation (documents, spreadsheets, presentations, pdfs) requests. Read the corresponding skills on how to invoke the tool before doing so."));
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -116,9 +116,15 @@ pub fn normalize_request_user_input_args(
|
||||
|
||||
pub fn request_user_input_tool_description(available_modes: &[ModeKind]) -> String {
|
||||
let allowed_modes = format_allowed_modes(available_modes);
|
||||
format!(
|
||||
let mut description = format!(
|
||||
"Request user input for one to three short questions and wait for the response. This tool is only available in {allowed_modes}."
|
||||
)
|
||||
);
|
||||
if available_modes.contains(&ModeKind::Default) {
|
||||
description.push_str(
|
||||
" In Default mode, this tool is only available for artifact creation (documents, spreadsheets, presentations, pdfs) requests. Read the corresponding skills on how to invoke the tool before doing so.",
|
||||
);
|
||||
}
|
||||
description
|
||||
}
|
||||
|
||||
fn format_allowed_modes(available_modes: &[ModeKind]) -> String {
|
||||
|
||||
@@ -140,6 +140,6 @@ fn request_user_input_tool_description_mentions_available_modes() {
|
||||
);
|
||||
assert_eq!(
|
||||
request_user_input_tool_description(&default_mode_enabled_available_modes()),
|
||||
"Request user input for one to three short questions and wait for the response. This tool is only available in Default or Plan mode.".to_string()
|
||||
"Request user input for one to three short questions and wait for the response. This tool is only available in Default or Plan mode. In Default mode, this tool is only available for artifact creation (documents, spreadsheets, presentations, pdfs) requests. Read the corresponding skills on how to invoke the tool before doing so.".to_string()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user