mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 12:43:16 +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);
|
||||
|
||||
// If original had literal \n, convert back
|
||||
if (patchString.includes("\\n") && !result.includes("\\n")) {
|
||||
// More robust check for patches that use literal \n as line separators
|
||||
const usesLiteralNewlines =
|
||||
/^[^\\]*\\n/.test(patchString) && patchString.split("\n").length === 1;
|
||||
|
||||
if (usesLiteralNewlines && !result.includes("\\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" },
|
||||
maxTokens,
|
||||
}
|
||||
: {}),
|
||||
: { maxTokens: 5_000 }),
|
||||
});
|
||||
|
||||
return model;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue