MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / flagValue

Function flagValue

projects/runtime-node/src/cli.ts:87–93  ·  view source on GitHub ↗
(args: string[], name: string)

Source from the content-addressed store, hash-verified

85}
86
87function flagValue(args: string[], name: string): string | undefined {
88 const prefix = `${name}=`
89 const inline = args.find((arg) => arg.startsWith(prefix))
90 if (inline) return inline.slice(prefix.length)
91 const index = args.indexOf(name)
92 return index >= 0 ? args[index + 1] : undefined
93}
94
95function codexAppServerFromEnvOrFlags(command: string[], env: NodeJS.ProcessEnv): RuntimeNodeCodexAppServerConfig | undefined {
96 const websocketUrl = flagValue(command, "--codex-server-url") ?? env.RUNTIME_NODE_CODEX_SERVER_URL

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected