MCPcopy Create free account
hub / github.com/tiann/hapi / removeFromQueue

Function removeFromQueue

cli/src/opencode/opencodeLocalLauncher.ts:99–110  ·  view source on GitHub ↗
(map: Map<string, string[]>, key: string, value: string)

Source from the content-addressed store, hash-verified

97}
98
99function removeFromQueue(map: Map<string, string[]>, key: string, value: string): void {
100 const queue = map.get(key);
101 if (!queue || queue.length === 0) {
102 return;
103 }
104 const nextQueue = queue.filter((entry) => entry !== value);
105 if (!nextQueue.length) {
106 map.delete(key);
107 } else {
108 map.set(key, nextQueue);
109 }
110}
111
112function extractSessionId(value: unknown): string | null {
113 if (!isObject(value)) {

Callers 1

handleHookEventFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected