MCPcopy Index your code
hub / github.com/ByBrawe/opencode-loop / markHandled

Function markHandled

src/index.js:452–455  ·  view source on GitHub ↗
(sessionID, name, args)

Source from the content-addressed store, hash-verified

450}
451
452function commandKey(sessionID, name, args) { return `${sessionID || "no-session"}:${name || ""}:${normalizeArgsForKey(args)}` }
453function markHandled(sessionID, name, args) {
454 handledCommands.set(commandKey(sessionID, name, args), now())
455 for (const [key, time] of handledCommands.entries()) if (now() - time > 30_000) handledCommands.delete(key)
456}
457function wasHandled(sessionID, name, args) {
458 const time = handledCommands.get(commandKey(sessionID, name, args))

Callers 1

handleCommandFunction · 0.85

Calls 2

commandKeyFunction · 0.85
nowFunction · 0.85

Tested by

no test coverage detected