minpeter
08b663df86
refactor(hashline-edit): enforce three-op edit model
...
Unify internal hashline edit handling around replace/append/prepend to remove legacy operation shapes. This keeps normalization, ordering, deduplication, execution, and tests aligned with the new op/pos/end/lines contract.
2026-02-24 05:06:41 +09:00
YeonGyu-Kim
5d1d87cc10
feat(hashline-edit): add autocorrect, BOM/CRLF normalization, and file creation support
...
Implements key features from oh-my-pi to improve agent editing success rates:
- Autocorrect v1: single-line merge expansion, wrapped line restoration,
paired indent restoration (autocorrect-replacement-lines.ts)
- BOM/CRLF normalization: canonicalize on read, restore on write
(file-text-canonicalization.ts)
- Pre-validate all hashes before mutation (edit-ordering.ts)
- File creation via append/prepend operations (new types + executor logic)
- Modular refactoring: split edit-operations.ts into focused modules
(primitives, ordering, deduplication, diff, executor)
- Enhanced tool description with operation choice guide and recovery hints
All 50 tests pass. TypeScript clean. Build successful.
2026-02-22 14:13:59 +09:00