MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isSlashCommand

Function isSlashCommand

src/utils/queueProcessor.ts:20–31  ·  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

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

Callers 2

processQueueIfReadyFunction · 0.70
queryLoopFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected