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

Function isSlashCommand

source code/utils/queueProcessor.ts:22–33  ·  view source on GitHub ↗

* Check if a queued command is a slash command (value starts with '/').

(cmd: QueuedCommand)

Source from the content-addressed store, hash-verified

20 * Check if a queued command is a slash command (value starts with '/').
21 */
22function isSlashCommand(cmd: QueuedCommand): boolean {
23 if (typeof cmd.value === 'string') {
24 return cmd.value.trim().startsWith('/')
25 }
26 // For ContentBlockParam[], check the first text block
27 for (const block of cmd.value) {
28 if (block.type === 'text') {
29 return block.text.trim().startsWith('/')
30 }
31 }
32 return false
33}
34
35/**
36 * Processes commands from the queue.

Callers 2

processQueueIfReadyFunction · 0.70
queryLoopFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected