MCPcopy
hub / github.com/simstudioai/sim / parseCallChain

Function parseCallChain

apps/sim/lib/execution/call-chain.ts:16–24  ·  view source on GitHub ↗
(headerValue: string | null | undefined)

Source from the content-addressed store, hash-verified

14 * Returns an empty array when the header is absent or empty.
15 */
16export function parseCallChain(headerValue: string | null | undefined): string[] {
17 if (!headerValue || !headerValue.trim()) {
18 return []
19 }
20 return headerValue
21 .split(',')
22 .map((id) => id.trim())
23 .filter(Boolean)
24}
25
26/**
27 * Serializes a call chain array back into the header value format.

Callers 2

call-chain.test.tsFile · 0.90
handleExecutePostFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected