codex: fix multi-env apply_patch grammar on Windows

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-05-07 19:39:40 -07:00
parent 1943bb005c
commit 52b025f591
2 changed files with 2 additions and 0 deletions

View File

@@ -111,6 +111,7 @@ pub fn create_apply_patch_freeform_tool(multi_environment: bool) -> ToolSpec {
syntax: "lark".to_string(),
definition: if multi_environment {
APPLY_PATCH_LARK_GRAMMAR
.replace("\r\n", "\n")
.replace(APPLY_PATCH_STRICT_START, APPLY_PATCH_WITH_ENV_START)
.replace(
APPLY_PATCH_BEGIN_PATCH_RULE,

View File

@@ -5,6 +5,7 @@ use std::collections::BTreeMap;
fn multi_environment_apply_patch_grammar() -> String {
APPLY_PATCH_LARK_GRAMMAR
.replace("\r\n", "\n")
.replace(APPLY_PATCH_STRICT_START, APPLY_PATCH_WITH_ENV_START)
.replace(
APPLY_PATCH_BEGIN_PATCH_RULE,