(output: string, maxLength: number)
| 164 | }) |
| 165 | |
| 166 | const truncateOutput = (output: string, maxLength: number) => |
| 167 | output.length > maxLength |
| 168 | ? output.substring(0, maxLength) + '\n\n[Output truncated]' |
| 169 | : output |
| 170 | |
| 171 | const timeoutId = setTimeout(() => { |
| 172 | if (isResolved) return |