Skip to content

parseSlashCommand

parseSlashCommand(input): ParsedSlashCommand | null

Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:364

Parse a raw input line into a slash command, or null if it is not one. A line is a slash command iff its first non-whitespace character is / AND no further / appears after the leading one (GS2-8, Mari’s dogfood addendum): a pasted filesystem path like /usr/home/bob/test.md contains later slashes, so it falls through as ordinary prompt text instead of being swallowed as an unknown command. The name is lower-cased; remaining whitespace-separated tokens are the args.

string

ParsedSlashCommand | null