(text: string, max: number)
| 377 | } |
| 378 | |
| 379 | function truncate(text: string, max: number): string { |
| 380 | const oneLine = text.replace(/\s+/g, " ").trim() |
| 381 | return oneLine.length <= max ? oneLine : oneLine.slice(0, max - 1) + "…" |
| 382 | } |
| 383 | |
| 384 | interface RawHookOutput { |
| 385 | stdout: string |