(existing: string | undefined, addition: string)
| 339 | } |
| 340 | |
| 341 | function mergeContext(existing: string | undefined, addition: string): string { |
| 342 | return existing ? `${existing}\n\n${addition}` : addition |
| 343 | } |
| 344 | |
| 345 | /** Cap injected context so a single hook can't blow the model's context window. */ |
| 346 | function capContext(text: string): string { |