MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / parseSlashCommand

Function parseSlashCommand

ui-tui/src/domain/slash.ts:6–10  ·  view source on GitHub ↗
(cmd: string)

Source from the content-addressed store, hash-verified

4export const looksLikeSlashCommand = (text: string) => /^\/[^\s/]*(?:\s|$)/.test(text)
5
6export const parseSlashCommand = (cmd: string) => {
7 const [name = '', ...rest] = cmd.slice(1).split(/\s+/)
8
9 return { arg: rest.join(' '), cmd, name: name.toLowerCase() }
10}
11
12/**
13 * Apply a completion row to the current input, mirroring the editor's

Callers 1

handlerFunction · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected