(...values: unknown[])
| 308 | export const buildErrorToolUpdate = errorToolUpdate |
| 309 | |
| 310 | function locationFrom(...values: unknown[]): ToolCallLocation[] { |
| 311 | return Array.from( |
| 312 | new Set( |
| 313 | values.flatMap((value): string[] => { |
| 314 | if (Array.isArray(value)) { |
| 315 | return value.filter((item): item is string => typeof item === "string" && item.length > 0) |
| 316 | } |
| 317 | const path = stringValue(value) |
| 318 | return path ? [path] : [] |
| 319 | }), |
| 320 | ), |
| 321 | (path) => ({ path }), |
| 322 | ) |
| 323 | } |
| 324 | |
| 325 | function diffContent(input: ToolInput): ToolCallContent[] { |
| 326 | const oldText = stringValue(input.oldString) |
no test coverage detected