mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Upon finding > 1 occurrences do not attempt auto-correction.
- When correcting edits prior to this if we found more than one occurrence we would try to auto-correct the old/new strings. There's no need in this situation because the tool has already provided too vague of an old_string to act upon. Instantly return. Part of https://github.com/google-gemini/gemini-cli/issues/484
This commit is contained in:
committed by
N. Taylor Mullen
parent
ceb25c8350
commit
2e3eeaf920
@@ -69,6 +69,12 @@ export async function ensureCorrectEdit(
|
|||||||
originalParams.new_string,
|
originalParams.new_string,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
} else if (occurrences > 1) {
|
||||||
|
const result: CorrectedEditResult = {
|
||||||
|
params: { ...originalParams },
|
||||||
|
occurrences,
|
||||||
|
};
|
||||||
|
return result;
|
||||||
} else {
|
} else {
|
||||||
// occurrences is 0 or some other unexpected state initially
|
// occurrences is 0 or some other unexpected state initially
|
||||||
const unescapedOldStringAttempt = unescapeStringForGeminiBug(
|
const unescapedOldStringAttempt = unescapeStringForGeminiBug(
|
||||||
|
|||||||
Reference in New Issue
Block a user