mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-05 20:02:11 +00:00
Harrison/patch (#58)
* stash * Apply suggestions from code review * Update apps/open-swe/src/utils/load-model.ts * Update apps/web/src/components/thread/index.tsx * cr --------- Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
This commit is contained in:
parent
56d9df7246
commit
c0d312601f
2 changed files with 6 additions and 3 deletions
|
|
@ -384,8 +384,11 @@ export function fixGitPatch(
|
||||||
|
|
||||||
const result: string = buildPatch(parsed);
|
const result: string = buildPatch(parsed);
|
||||||
|
|
||||||
// If original had literal \n, convert back
|
// More robust check for patches that use literal \n as line separators
|
||||||
if (patchString.includes("\\n") && !result.includes("\\n")) {
|
const usesLiteralNewlines =
|
||||||
|
/^[^\\]*\\n/.test(patchString) && patchString.split("\n").length === 1;
|
||||||
|
|
||||||
|
if (usesLiteralNewlines && !result.includes("\\n")) {
|
||||||
return result.replace(/\n/g, "\\n");
|
return result.replace(/\n/g, "\\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ export async function loadModel(config: GraphConfig, task: Task) {
|
||||||
thinking: { budget_tokens: thinkingBudgetTokens, type: "enabled" },
|
thinking: { budget_tokens: thinkingBudgetTokens, type: "enabled" },
|
||||||
maxTokens,
|
maxTokens,
|
||||||
}
|
}
|
||||||
: {}),
|
: { maxTokens: 5_000 }),
|
||||||
});
|
});
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue