(content: string)
| 272 | const MAX_HOOK_OUTPUT_LENGTH = 10000 |
| 273 | |
| 274 | function applyTruncation(content: string): string { |
| 275 | if (content.length > MAX_HOOK_OUTPUT_LENGTH) { |
| 276 | return `${content.substring(0, MAX_HOOK_OUTPUT_LENGTH)}… [output truncated - exceeded ${MAX_HOOK_OUTPUT_LENGTH} characters]` |
| 277 | } |
| 278 | return content |
| 279 | } |
| 280 | |
| 281 | async function processUserInputBase( |
| 282 | input: string | Array<ContentBlockParam>, |