(name: string, input: Record<string, unknown>)
| 151 | } |
| 152 | |
| 153 | function toolSummary(name: string, input: Record<string, unknown>): string { |
| 154 | const verb = TOOL_VERBS[name] ?? name |
| 155 | const target = |
| 156 | (input.file_path as string) ?? |
| 157 | (input.filePath as string) ?? |
| 158 | (input.pattern as string) ?? |
| 159 | (input.command as string | undefined)?.slice(0, 60) ?? |
| 160 | (input.url as string) ?? |
| 161 | (input.query as string) ?? |
| 162 | '' |
| 163 | if (target) { |
| 164 | return `${verb} ${target}` |
| 165 | } |
| 166 | return verb |
| 167 | } |
| 168 | |
| 169 | function extractActivities( |
| 170 | line: string, |