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

Function formatWf

apps/sim/lib/copilot/chat/workspace-context.ts:150–162  ·  view source on GitHub ↗
(wf: (typeof data.workflows)[0], indent: string)

Source from the content-addressed store, hash-verified

148 }
149
150 const formatWf = (wf: (typeof data.workflows)[0], indent: string) => {
151 const parts = [`${indent}- **${wf.name}** (${wf.id})`]
152 const workflowDir = canonicalWorkflowVfsDir({ name: wf.name, folderPath: wf.folderPath })
153 parts.push(`${indent} VFS dir: \`${workflowDir}\``)
154 parts.push(`${indent} VFS state path: \`${workflowDir}/state.json\``)
155 if (wf.description) parts.push(`${indent} ${wf.description}`)
156 // `deployed` is a structural flag (kept); `lastRunAt` is intentionally
157 // omitted — it changes on every run and would bust the cached prompt
158 // prefix that carries this inventory. Current run data lives in
159 // workflows/{name}/executions.json.
160 if (wf.isDeployed) parts[0] += ' — deployed'
161 return parts.join('\n')
162 }
163
164 const lines: string[] = []
165 lines.push(

Callers 1

buildWorkspaceMdFunction · 0.85

Calls 3

canonicalWorkflowVfsDirFunction · 0.90
joinMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected