MCPcopy Create free account
hub / github.com/simstudioai/sim / specialToolDisplay

Function specialToolDisplay

apps/sim/lib/copilot/tools/client/store-utils.ts:33–54  ·  view source on GitHub ↗
(
  toolName: string,
  state: ClientToolCallState,
  params?: Record<string, unknown>
)

Source from the content-addressed store, hash-verified

31}
32
33function specialToolDisplay(
34 toolName: string,
35 state: ClientToolCallState,
36 params?: Record<string, unknown>
37): ClientToolDisplay | undefined {
38 if (toolName === INTERNAL_RESPOND_TOOL || toolName.endsWith(HIDDEN_TOOL_SUFFIX)) {
39 return {
40 text: formatRespondLabel(state),
41 icon: Loader,
42 }
43 }
44
45 if (toolName === ReadTool.id) {
46 const target = describeReadTarget(readStringParam(params, 'path'))
47 return {
48 text: formatReadingLabel(target, state),
49 icon: FileText,
50 }
51 }
52
53 return undefined
54}
55
56function formatRespondLabel(state: ClientToolCallState): string {
57 void state

Callers 1

resolveToolDisplayFunction · 0.85

Calls 4

formatRespondLabelFunction · 0.85
describeReadTargetFunction · 0.85
readStringParamFunction · 0.85
formatReadingLabelFunction · 0.85

Tested by

no test coverage detected