MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / parseAllowCommandArgs

Function parseAllowCommandArgs

src/core/bridge_coordinator.ts:21162–21169  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

21160}
21161
21162function parseAllowCommandArgs(args): { option: 1 | 2 | 3 | null; requestIndex: number } {
21163 const option = normalizeAllowOption(args[0]);
21164 const parsedIndex = Number.parseInt(String(args[1] ?? ''), 10);
21165 return {
21166 option,
21167 requestIndex: Number.isFinite(parsedIndex) && parsedIndex > 0 ? parsedIndex : 1,
21168 };
21169}
21170
21171function normalizeAllowOption(value): 1 | 2 | 3 | null {
21172 const normalized = String(value ?? '').trim().toLowerCase();

Callers 1

handleAllowCommandMethod · 0.85

Calls 1

normalizeAllowOptionFunction · 0.85

Tested by

no test coverage detected