The model may send replace_all as a boolean or a string ("true"/"1").
(value: unknown)
| 59 | |
| 60 | /** The model may send replace_all as a boolean or a string ("true"/"1"). */ |
| 61 | function parseReplaceAll(value: unknown): boolean { |
| 62 | return value === true || value === "true" || value === "1" |
| 63 | } |
| 64 | |
| 65 | function applyEdit(content: string, edit: EditSpec): { content: string; error?: string } { |
| 66 | const { old_string, new_string } = edit |
no outgoing calls
no test coverage detected