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

Function stampToolCallBlockEnd

apps/sim/lib/copilot/request/handlers/tool.ts:228–240  ·  view source on GitHub ↗
(
  context: StreamingContext,
  toolCallId: string,
  endTime: number
)

Source from the content-addressed store, hash-verified

226}
227
228function stampToolCallBlockEnd(
229 context: StreamingContext,
230 toolCallId: string,
231 endTime: number
232): void {
233 for (let i = context.contentBlocks.length - 1; i >= 0; i--) {
234 const block = context.contentBlocks[i]
235 if (block.type === 'tool_call' && block.toolCall?.id === toolCallId) {
236 if (block.endedAt === undefined) block.endedAt = endTime
237 return
238 }
239 }
240}
241
242async function handleCallPhase(
243 data: MothershipStreamV1ToolCallDescriptor,

Callers 1

handleResultPhaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected