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

Function workflowIdFromStorageKey

apps/sim/lib/logs/execution/trace-store.ts:50–54  ·  view source on GitHub ↗

* Recovers the workflowId embedded in a large-value storage key * (`execution/{workspaceId}/{workflowId}/{executionId}/ `). Used when the * log row's workflowId has been nulled by workflow deletion.

(key: string | undefined)

Source from the content-addressed store, hash-verified

48 * log row's workflowId has been nulled by workflow deletion.
49 */
50function workflowIdFromStorageKey(key: string | undefined): string | undefined {
51 if (!key) return undefined
52 const parts = key.split('/')
53 return parts.length >= 5 && parts[0] === 'execution' ? parts[2] : undefined
54}
55
56/**
57 * Recursively removes `cost` from trace spans before persistence. Cost lives in

Callers 1

materializeExecutionDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected