( maxPriority: QueuePriority, )
| 523 | * Passing 'now' returns only now-priority commands; 'later' returns everything. |
| 524 | */ |
| 525 | export 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 |
no outgoing calls
no test coverage detected