( trigger: 'manual' | 'auto', preTokens: number, lastPreCompactMessageUuid?: UUID, userContext?: string, messagesSummarized?: number, )
| 4528 | } |
| 4529 | |
| 4530 | export function createCompactBoundaryMessage( |
| 4531 | trigger: 'manual' | 'auto', |
| 4532 | preTokens: number, |
| 4533 | lastPreCompactMessageUuid?: UUID, |
| 4534 | userContext?: string, |
| 4535 | messagesSummarized?: number, |
| 4536 | ): SystemCompactBoundaryMessage { |
| 4537 | return { |
| 4538 | type: 'system', |
| 4539 | subtype: 'compact_boundary', |
| 4540 | content: `Conversation compacted`, |
| 4541 | isMeta: false, |
| 4542 | timestamp: new Date().toISOString(), |
| 4543 | uuid: randomUUID(), |
| 4544 | level: 'info', |
| 4545 | compactMetadata: { |
| 4546 | trigger, |
| 4547 | preTokens, |
| 4548 | userContext, |
| 4549 | messagesSummarized, |
| 4550 | }, |
| 4551 | ...(lastPreCompactMessageUuid && { |
| 4552 | logicalParentUuid: lastPreCompactMessageUuid, |
| 4553 | }), |
| 4554 | } |
| 4555 | } |
| 4556 | |
| 4557 | export function createMicrocompactBoundaryMessage( |
| 4558 | trigger: 'auto', |
no outgoing calls
no test coverage detected