fix: corrected optional edit path fallback across chunk hashline modes

- Added raw read output propagation so read/archive commands bypass anchors, line numbers, and chunk formatting.
- Fixed atom/hashline editing by tightening hashline prefixes and applying grouped anchor edits in stable order.
- Hardened chunk parsing and path handling by using `bigram_end` checks and resolving edit paths via shared `args.path` fallback.
- Updated path-related behavior for chunk, replace, patch, and hashline previews to honor optional edit paths.
- Removed mode-level param validators and replaced them with runtime handling, then removed obsolete validation tests.
This commit is contained in:
can1357
2026-04-26 00:08:02 +02:00
parent 01932d9920
commit 480d40f2a8
16 changed files with 217 additions and 310 deletions
@@ -191,11 +191,11 @@ const HASHLINE_SUBTYPES = ["set", "set_range", "insert"] as const;
const CHUNK_OP_SUBTYPES = ["append", "prepend", "replace", "delete"] as const;
const BENCHMARK_TOOL_NAMES = ["read", "edit", "vim", "write"] as const;
const EDIT_TOOL_NAMES = ["edit", "vim"] as const;
const BENCHMARK_TOOL_NAMES = ["read", "edit", "vim", "write", "apply_patch"] as const;
const EDIT_TOOL_NAMES = ["edit", "vim", "apply_patch"] as const;
function isEditTool(toolName: unknown): toolName is (typeof EDIT_TOOL_NAMES)[number] {
return toolName === "edit" || toolName === "vim";
return toolName === "edit" || toolName === "vim" || toolName === "apply_patch";
}
function isMutationTool(toolName: unknown): boolean {