MCPcopy Create free account
hub / github.com/RioArisk/claudecode_api_RemoteControl / extractSlashCommand

Function extractSlashCommand

lib/transcript.js:65–72  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

63}
64
65function extractSlashCommand(content) {
66 const text = flattenUserContent(content).trim();
67 if (!text) return '';
68 const commandTagMatch = text.match(/<command-name>\s*(\/[^\s<]+)\s*<\/command-name>/i);
69 if (commandTagMatch) return commandTagMatch[1].trim().toLowerCase();
70 const inlineMatch = text.match(/^(\/\S+)/);
71 return inlineMatch ? inlineMatch[1].trim().toLowerCase() : '';
72}
73
74function isUserInterruptEvent(content) {
75 const text = flattenUserContent(content)

Callers 4

extractSessionPromptFunction · 0.85
startTailingFunction · 0.85
setupWebSocketServerFunction · 0.85
test-modules.jsFile · 0.85

Calls 1

flattenUserContentFunction · 0.85

Tested by

no test coverage detected