Documentation
¶
Overview ¶
Package hashline_edit implements LINE#ID-anchored file edits.
Each edit cites a position as "<lineNumber>#<3-char tag>" (e.g. "42#VKM"). The tag is the content-hash of the line as it existed when the model saw it (via view with hashline=true). Before applying, every claimed tag is recomputed against the live file. If any tag is stale, the whole batch is rejected and the file is left untouched, no partial writes.
Edits are applied bottom-up (highest line number first) so each edit's line number stays valid even after earlier edits change line counts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWithFilter ¶
NewWithFilter constructs the hashline_edit tool with an optional path regex. When pathRe is nil, all paths are allowed (existing behavior). When pathRe is non-nil, edits to paths that do NOT match are rejected with a clear error and the file is left untouched. Paths are matched relative to the current working directory when possible.