feat(coding-agent): introduced hashline format v2 with colon separators and tag-based API

- Changed hashline format separator from pipe (|) to colon (:) for improved readability across all tools and output formats.
- Refactored hashline edit API with operation-based structure: renamed delete->rm, rename->mv, set->target/new_content, and added explicit op field for operation types.
- Updated hashline hash encoding from 4-character base36 to 2-character hexadecimal for more compact representation.
- Replaced anchor terminology with tags throughout hashline documentation and API for clearer semantics.
This commit is contained in:
can1357
2026-02-19 20:00:23 +01:00
parent e7b01abf0c
commit 7ce3bb6906
17 changed files with 5616 additions and 837 deletions
+1 -1
View File
@@ -8,8 +8,8 @@ import * as Diff from "diff";
import { resolveToCwd } from "../tools/path-utils";
import { previewPatch } from "./applicator";
import { DEFAULT_FUZZY_THRESHOLD, findMatch } from "./fuzzy";
import type { HashlineEdit } from "./hashline";
import { applyHashlineEdits } from "./hashline";
import type { HashlineEdit } from "./index";
import { adjustIndentation, normalizeToLF, stripBom } from "./normalize";
import type { DiffError, DiffResult, PatchInput } from "./types";
import { EditMatchError } from "./types";