(input: Partial<{
file_path: string;
old_string: string;
new_string: string;
replace_all: boolean;
edits: unknown[];
}> | undefined)
| 22 | import type { FileEditOutput } from './types.js'; |
| 23 | import { findActualString, getPatchForEdit, preserveQuoteStyle } from './utils.js'; |
| 24 | export function userFacingName(input: Partial<{ |
| 25 | file_path: string; |
| 26 | old_string: string; |
| 27 | new_string: string; |
| 28 | replace_all: boolean; |
| 29 | edits: unknown[]; |
| 30 | }> | undefined): string { |
| 31 | if (!input) { |
| 32 | return 'Update'; |
| 33 | } |
| 34 | if (input.file_path?.startsWith(getPlansDirectory())) { |
| 35 | return 'Updated plan'; |
| 36 | } |
| 37 | // Hashline edits always modify an existing file (line-ref based) |
| 38 | if (input.edits != null) { |
| 39 | return 'Update'; |
| 40 | } |
| 41 | if (input.old_string === '') { |
| 42 | return 'Create'; |
| 43 | } |
| 44 | return 'Update'; |
| 45 | } |
| 46 | export function getToolUseSummary(input: Partial<{ |
| 47 | file_path: string; |
| 48 | old_string: string; |
nothing calls this directly
no outgoing calls
no test coverage detected