fix(coding-agent/core): allowed duplicate delete operations on atom anchor lines
- Adjusted atom mutation conflict validation to skip throwing on repeated delete edits for the same anchor line. - Added tests confirming duplicate delete edits on one anchor are idempotent and do not trigger conflicts. - Added coverage ensuring explicit deletes within replace ranges are treated as redundant and ignored.
This commit is contained in:
@@ -879,6 +879,7 @@ function validateNoConflictingAtomMutations(edits: AtomEdit[]): void {
|
||||
if (edit.kind !== "set" && edit.kind !== "delete") continue;
|
||||
const existing = mutatingPerLine.get(edit.anchor.line);
|
||||
if (existing) {
|
||||
if (existing === "delete" && edit.kind === "delete") continue;
|
||||
throw new Error(
|
||||
`Conflicting ops on anchor line ${edit.anchor.line}: \`${existing}\` and \`${edit.kind}\`. ` +
|
||||
"At most one mutating op (set/delete) is allowed per anchor.",
|
||||
|
||||
Reference in New Issue
Block a user