MCPcopy Index your code
hub / github.com/simstudioai/sim / flushThinkingBlock

Function flushThinkingBlock

apps/sim/lib/copilot/request/handlers/types.ts:59–66  ·  view source on GitHub ↗
(context: StreamingContext)

Source from the content-addressed store, hash-verified

57 * Safe to call repeatedly.
58 */
59export function flushThinkingBlock(context: StreamingContext): void {
60 if (context.currentThinkingBlock) {
61 stampBlockEnd(context.currentThinkingBlock)
62 context.contentBlocks.push(context.currentThinkingBlock)
63 }
64 context.isInThinkingBlock = false
65 context.currentThinkingBlock = null
66}
67
68/**
69 * Flush open subagent thinking blocks into contentBlocks. With a parentToolCallId

Callers 5

runStreamLoopFunction · 0.90
handleTextEventFunction · 0.90
handleCompleteEventFunction · 0.90
handleErrorEventFunction · 0.90
handleToolEventFunction · 0.90

Calls 2

stampBlockEndFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected