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

Function getToolCallTerminalData

apps/sim/lib/copilot/request/tool-call-state.ts:59–75  ·  view source on GitHub ↗
(
  toolCall: Pick<ToolCallState, 'id' | 'status' | 'result' | 'error'>
)

Source from the content-addressed store, hash-verified

57}
58
59export function getToolCallTerminalData(
60 toolCall: Pick<ToolCallState, 'id' | 'status' | 'result' | 'error'>
61): unknown {
62 const output = getToolCallStateOutput(toolCall)
63 if (output !== undefined) {
64 return output
65 }
66
67 if (
68 toolCall.status === MothershipStreamV1ToolOutcome.success ||
69 toolCall.status === MothershipStreamV1ToolOutcome.skipped
70 ) {
71 return undefined
72 }
73
74 return { error: requireToolCallError(toolCall) }
75}
76
77export function setTerminalToolCallState(
78 toolCall: ToolCallState,

Callers 4

collectResultsForToolIdsFunction · 0.90
runCheckpointLoopFunction · 0.90

Calls 2

getToolCallStateOutputFunction · 0.85
requireToolCallErrorFunction · 0.85

Tested by

no test coverage detected