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

Function toToolCallInfo

apps/sim/lib/copilot/chat/display-message.ts:35–49  ·  view source on GitHub ↗
(block: PersistedContentBlock)

Source from the content-addressed store, hash-verified

33}
34
35function toToolCallInfo(block: PersistedContentBlock): ToolCallInfo | undefined {
36 const tc = block.toolCall
37 if (!tc) return undefined
38 if (isToolHiddenInUi(tc.name)) return undefined
39 const status: ToolCallStatus = STATE_TO_STATUS[tc.state] ?? ToolCallStatus.error
40 return {
41 id: tc.id,
42 name: tc.name,
43 status,
44 displayTitle: status === ToolCallStatus.cancelled ? 'Stopped by user' : tc.display?.title,
45 params: tc.params,
46 calledBy: tc.calledBy,
47 result: tc.result,
48 }
49}
50
51function toDisplayBlock(block: PersistedContentBlock): ContentBlock | undefined {
52 const displayed = toDisplayBlockBody(block)

Callers 1

toDisplayBlockBodyFunction · 0.85

Calls 1

isToolHiddenInUiFunction · 0.90

Tested by

no test coverage detected