MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / parseSpawnValue

Function parseSpawnValue

source code/bridge/bridgeMain.ts:1724–1729  ·  view source on GitHub ↗
(raw: string | undefined)

Source from the content-addressed store, hash-verified

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

Callers 1

parseArgsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected