( context: StreamingContext, block: Omit<ContentBlock, 'timestamp'> )
| 39 | const logger = createLogger('CopilotHandlerHelpers') |
| 40 | |
| 41 | export function addContentBlock( |
| 42 | context: StreamingContext, |
| 43 | block: Omit<ContentBlock, 'timestamp'> |
| 44 | ): void { |
| 45 | context.contentBlocks.push({ |
| 46 | ...block, |
| 47 | timestamp: Date.now(), |
| 48 | }) |
| 49 | } |
| 50 | |
| 51 | export function stampBlockEnd(block: ContentBlock): void { |
| 52 | if (block.endedAt === undefined) block.endedAt = Date.now() |
no test coverage detected