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

Function workspaceFileTitle

apps/sim/lib/copilot/tools/tool-display.ts:58–71  ·  view source on GitHub ↗
(args: ToolArgs)

Source from the content-addressed store, hash-verified

56}
57
58function workspaceFileTitle(args: ToolArgs): string {
59 const title = stringArg(args, 'title')
60 if (!title) return ''
61 const verbByOperation: Record<string, string> = {
62 create: 'Creating',
63 append: 'Adding',
64 patch: 'Editing',
65 update: 'Writing',
66 rename: 'Renaming',
67 delete: 'Deleting',
68 }
69 const verb = verbByOperation[stringArg(args, 'operation')] ?? 'Writing'
70 return `${verb} ${title}`
71}
72
73/** Static fallback titles for tools without an argument-aware title. */
74const TOOL_TITLES: Record<string, string> = {

Callers 1

getToolDisplayTitleFunction · 0.85

Calls 1

stringArgFunction · 0.85

Tested by

no test coverage detected