MCPcopy Create free account
hub / github.com/ByBrawe/opencode-loop / takeFlagValue

Function takeFlagValue

src/index.js:119–125  ·  view source on GitHub ↗
(rest, flag)

Source from the content-addressed store, hash-verified

117 rest = input;
118 } else if (first) {
119 const parsedDuration = parseDuration(first);
120 if (parsedDuration !== null)
121 intervalMs = parsedDuration;
122 else if (intervalMs === null)
123 return { ok: false, error: "Usage: /loop 0s <prompt> | /loop 5m <prompt> | /loop-goal <objective> | /loop-command 200m /compact | /loop-shell 10m npm test | /loop --watch progress.md <prompt>" };
124 else
125 rest = input;
126 }
127 }
128 if (intervalMs === null)

Callers 2

takeAllFlagValuesFunction · 0.85
parseLoopArgsFunction · 0.85

Calls 1

escapeRegExpFunction · 0.85

Tested by

no test coverage detected