MCPcopy
hub / github.com/Dimillian/CodexMonitor / parseSlashCommand

Function parseSlashCommand

src/features/threads/hooks/useQueuedSend.ts:77–106  ·  view source on GitHub ↗
(text: string, appsEnabled: boolean)

Source from the content-addressed store, hash-verified

75 | "status";
76
77function parseSlashCommand(text: string, appsEnabled: boolean): SlashCommandKind | null {
78 if (appsEnabled && /^\/apps\b/i.test(text)) {
79 return "apps";
80 }
81 if (/^\/fork\b/i.test(text)) {
82 return "fork";
83 }
84 if (/^\/fast\b/i.test(text)) {
85 return "fast";
86 }
87 if (/^\/mcp\b/i.test(text)) {
88 return "mcp";
89 }
90 if (/^\/review\b/i.test(text)) {
91 return "review";
92 }
93 if (/^\/compact\b/i.test(text)) {
94 return "compact";
95 }
96 if (/^\/new\b/i.test(text)) {
97 return "new";
98 }
99 if (/^\/resume\b/i.test(text)) {
100 return "resume";
101 }
102 if (/^\/status\b/i.test(text)) {
103 return "status";
104 }
105 return null;
106}
107
108export function useQueuedSend({
109 activeThreadId,

Callers 1

useQueuedSendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected