Commit 1312f5a
committed
refactor: drop redundant GuardAnchors type alias in file_edit_insert
In `src/node/services/tools/file_edit_insert.ts`, `GuardAnchors` was
defined as `Pick<InsertContentOptions, "insert_before" | "insert_after">`,
but `InsertContentOptions` itself is already
`Pick<FileEditInsertToolArgs, "insert_before" | "insert_after">` after
the `.nullish()` strict-mode refactor in #2250 stripped the
`InsertContentOptions` interface down to those same two fields. The two
aliases are now structurally identical, so `GuardAnchors` is dead.
Drop the alias and use `InsertContentOptions` for the two callers
(`insertWithGuards`, `resolveGuardAnchor`). Both names were file-local;
no exports change. The function names (`insertWithGuards`,
`resolveGuardAnchor`) already convey "guard" context, so the parameter
type doesn't need to repeat it.
Pure type-level cleanup — emitted JS, runtime behavior, and the public
tool surface are all unchanged.1 parent b3134cf commit 1312f5a
1 file changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
| |||
175 | 173 | | |
176 | 174 | | |
177 | 175 | | |
178 | | - | |
| 176 | + | |
179 | 177 | | |
180 | 178 | | |
181 | 179 | | |
| |||
216 | 214 | | |
217 | 215 | | |
218 | 216 | | |
219 | | - | |
| 217 | + | |
220 | 218 | | |
221 | 219 | | |
222 | 220 | | |
| |||
0 commit comments