MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / parseArgs

Function parseArgs

graph-ui/tools/agent-bridge.mjs:92–110  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

90
91/** Die Argumente, ohne Bibliothek. */
92export function parseArgs(argv) {
93 const options = { file: DEFAULT_TRACE_FILE, port: DEFAULT_BRIDGE_PORT, mode: 'live' };
94 for (let i = 0; i < argv.length; i += 1) {
95 const arg = argv[i];
96 if (arg === '--file' && argv[i + 1] !== undefined) {
97 options.file = argv[i + 1];
98 i += 1;
99 } else if (arg === '--replay' && argv[i + 1] !== undefined) {
100 options.file = argv[i + 1];
101 options.mode = 'replay';
102 i += 1;
103 } else if (arg === '--port' && argv[i + 1] !== undefined) {
104 options.port = Number(argv[i + 1]);
105 i += 1;
106 }
107 }
108 options.file = isAbsolute(options.file) ? options.file : resolve(process.cwd(), options.file);
109 return options;
110}
111
112/**
113 * Die Wiederaufnahme-Angabe lesen.

Callers 1

agent-bridge.mjsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected