edit_file
A built-in file editing tool in CodeSmith. Its description steers the model away from performing edits through shell commands such as sed -i, encouraging use of the dedicated tool instead.
Timeline (last 90 days)
The core Syntax Gate module is only 455 lines long and unifies the admission logic of the four disk-writing tools write_file, edit_file, apply_patch and fim_edit.
CodeSmith's tool descriptions contain about ten anti-pattern lists in the form 'Use this instead of ...', for example write_file discouraging heredoc, edit_file discouraging sed -i, fetch_url discouraging curl, and grep_files discouraging grep -r.
The edit_file tool performs exact-match replacement, and its validation rules include: if search and replace are identical, reject directly; replace_all and occurrence are mutually exclusive; occurrence must be a 1-based positive integer.
edit_file implements a three-level fuzzy fallback strategy: the first level tolerates leading whitespace; the second level normalizes typographic punctuation (curly quotes→straight quotes, em dash→--, non-breaking space→regular space); the third level strips line-number prefixes.
All Facts (4)
The core Syntax Gate module is only 455 lines long and unifies the admission logic of the four disk-writing tools write_file, edit_file, apply_patch and fim_edit.
50%UnverifiedCodeSmith's tool descriptions contain about ten anti-pattern lists in the form 'Use this instead of ...', for example write_file discouraging heredoc, edit_file discouraging sed -i, fetch_url discouraging curl, and grep_files discouraging grep -r.
50%UnverifiedThe edit_file tool performs exact-match replacement, and its validation rules include: if search and replace are identical, reject directly; replace_all and occurrence are mutually exclusive; occurrence must be a 1-based positive integer.
50%Unverifiededit_file implements a three-level fuzzy fallback strategy: the first level tolerates leading whitespace; the second level normalizes typographic punctuation (curly quotes→straight quotes, em dash→--, non-breaking space→regular space); the third level strips line-number prefixes.
50%