mirror of
https://github.com/openai/codex.git
synced 2026-11-04 00:24:43 +00:00
fix: parallel tool call instruction injection (#6893)
This commit is contained in:
1 parent
10d571f236
commit
4985a7a444
2 files changed
+8
-7
No files matched your search
@@ -1982,12 +1982,14 @@ async fn run_turn(
|
||||
let mut base_instructions = turn_context.base_instructions.clone();
|
||||
if parallel_tool_calls {
|
||||
static INSTRUCTIONS: &str = include_str!("../templates/parallel/instructions.md");
|
||||
static INSERTION_SPOT: &str = "## Editing constraints";
|
||||
base_instructions
|
||||
.as_mut()
|
||||
.map(|base| base.replace(INSERTION_SPOT, INSTRUCTIONS));
|
||||
if let Some(family) =
|
||||
find_family_for_model(&sess.state.lock().await.session_configuration.model)
|
||||
{
|
||||
let mut new_instructions = base_instructions.unwrap_or(family.base_instructions);
|
||||
new_instructions.push_str(INSTRUCTIONS);
|
||||
base_instructions = Some(new_instructions);
|
||||
}
|
||||
}
|
||||
|
||||
let prompt = Prompt {
|
||||
input,
|
||||
tools: router.specs(),
|
||||
|
||||
Reference in new issue
Block a user