MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / remove

Function remove

source code/utils/messageQueueManager.ts:275–294  ·  view source on GitHub ↗
(commandsToRemove: QueuedCommand[])

Source from the content-addressed store, hash-verified

273 * (e.g. from getCommandsByMaxPriority). Logs a 'remove' operation for each.
274 */
275export function remove(commandsToRemove: QueuedCommand[]): void {
276 if (commandsToRemove.length === 0) {
277 return
278 }
279
280 const before = commandQueue.length
281 for (let i = commandQueue.length - 1; i >= 0; i--) {
282 if (commandsToRemove.includes(commandQueue[i]!)) {
283 commandQueue.splice(i, 1)
284 }
285 }
286
287 if (commandQueue.length !== before) {
288 notifySubscribers()
289 }
290
291 for (const _cmd of commandsToRemove) {
292 logOperation('remove')
293 }
294}
295
296/**
297 * Remove commands matching a predicate.

Callers

nothing calls this directly

Calls 2

notifySubscribersFunction · 0.85
logOperationFunction · 0.85

Tested by

no test coverage detected