MCPcopy Create free account
hub / github.com/Noumena-Network/code / getCommandsByMaxPriority

Function getCommandsByMaxPriority

src/utils/messageQueueManager.ts:525–532  ·  view source on GitHub ↗
(
  maxPriority: QueuePriority,
)

Source from the content-addressed store, hash-verified

523 * Passing 'now' returns only now-priority commands; 'later' returns everything.
524 */
525export function getCommandsByMaxPriority(
526 maxPriority: QueuePriority,
527): QueuedCommand[] {
528 const threshold = PRIORITY_ORDER[maxPriority]
529 return commandQueue.filter(
530 cmd => PRIORITY_ORDER[cmd.priority ?? 'next'] <= threshold,
531 )
532}
533
534/**
535 * Returns true if the command is a slash command that should be routed through

Callers 3

queryLoopFunction · 0.85
runHeadlessStreamingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected