(output: string)
| 166 | } |
| 167 | |
| 168 | function truncateOutput(output: string): string { |
| 169 | if (output.length <= MAX_OUTPUT_CHARS) return output; |
| 170 | const truncated = output.slice(0, MAX_OUTPUT_CHARS); |
| 171 | return `${truncated}\n\n[OUTPUT TRUNCATED: showing ${MAX_OUTPUT_CHARS.toLocaleString()} of ${output.length.toLocaleString()} characters. Use head, grep, or more specific commands to narrow results.]`; |
| 172 | } |
| 173 | |
| 174 | const TOOL_DESCRIPTIONS: Record<string, string> = { |
| 175 | ls: 'List directory contents', |
no outgoing calls
no test coverage detected