(output: string)
| 88 | } |
| 89 | |
| 90 | function truncateOutput(output: string): string { |
| 91 | if (output.length <= MAX_OUTPUT_CHARS) return output; |
| 92 | const truncated = output.slice(0, MAX_OUTPUT_CHARS); |
| 93 | return `${truncated}\n\n[OUTPUT TRUNCATED: showing ${MAX_OUTPUT_CHARS.toLocaleString()} of ${output.length.toLocaleString()} characters]`; |
| 94 | } |
| 95 | |
| 96 | export const codemodeTools = { |
| 97 | code: tool({ |