mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
fix: parallel tool call instruction injection (#6893)
This commit is contained in:
committed by
GitHub
Unverified
parent
10d571f236
commit
4985a7a444
@@ -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