(output: string | undefined)
| 285 | * @returns Object with optional `tool_output` field |
| 286 | */ |
| 287 | export function truncateOutput(output: string | undefined): { tool_output?: string } { |
| 288 | if (!output) return {} |
| 289 | |
| 290 | const trimmed = output.substring(0, MAX_TOOL_OUTPUT_LENGTH) |
| 291 | if (trimmed.length === 0) return {} |
| 292 | |
| 293 | return { tool_output: trimmed } |
| 294 | } |
no outgoing calls
no test coverage detected