( userInstructions: string | undefined, hookInstructions: string | undefined, )
| 372 | * Empty strings normalize to undefined. |
| 373 | */ |
| 374 | export function mergeHookInstructions( |
| 375 | userInstructions: string | undefined, |
| 376 | hookInstructions: string | undefined, |
| 377 | ): string | undefined { |
| 378 | if (!hookInstructions) return userInstructions || undefined |
| 379 | if (!userInstructions) return hookInstructions |
| 380 | return `${userInstructions}\n\n${hookInstructions}` |
| 381 | } |
| 382 | |
| 383 | /** |
| 384 | * Creates a compact version of a conversation by summarizing older messages |
no outgoing calls
no test coverage detected