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

Function humanizedFallback

apps/sim/lib/copilot/tools/client/store-utils.ts:168–184  ·  view source on GitHub ↗
(
  toolName: string,
  state: ClientToolCallState
)

Source from the content-addressed store, hash-verified

166}
167
168function humanizedFallback(
169 toolName: string,
170 state: ClientToolCallState
171): ClientToolDisplay | undefined {
172 const titleCaseName = toolName.replace(/_/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase())
173 if (state === ClientToolCallState.error) {
174 const lowerCaseName = toolName.replace(/_/g, ' ').toLowerCase()
175 return { text: `Attempted to ${lowerCaseName}`, icon: Loader }
176 }
177 const stateVerb =
178 state === ClientToolCallState.success
179 ? 'Executed'
180 : state === ClientToolCallState.rejected || state === ClientToolCallState.aborted
181 ? 'Skipped'
182 : 'Executing'
183 return { text: `${stateVerb} ${titleCaseName}`, icon: Loader }
184}

Callers 1

resolveToolDisplayFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected