MCPcopy Index your code
hub / github.com/codeaashu/claude-code / parseSpawnValue

Function parseSpawnValue

src/bridge/bridgeMain.ts:1722–1727  ·  view source on GitHub ↗
(raw: string | undefined)

Source from the content-addressed store, hash-verified

1720const SPAWN_FLAG_VALUES = ['session', 'same-dir', 'worktree'] as const
1721
1722function parseSpawnValue(raw: string | undefined): SpawnMode | string {
1723 if (raw === 'session') return 'single-session'
1724 if (raw === 'same-dir') return 'same-dir'
1725 if (raw === 'worktree') return 'worktree'
1726 return `--spawn requires one of: ${SPAWN_FLAG_VALUES.join(', ')} (got: ${raw ?? '<missing>'})`
1727}
1728
1729function parseCapacityValue(raw: string | undefined): number | string {
1730 const n = raw === undefined ? NaN : parseInt(raw, 10)

Callers 1

parseArgsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected