filterSlashCommands
filterSlashCommands(
registry,query):SlashCommand[]
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:404
TUI-C10 — filter the registry down to the commands that match a menu query, most-relevant first.
Prefix matches (the name starts with the query) rank above looser substring matches; within each
bucket the registry’s own order is preserved (so extension-registered commands — appended to the
array — naturally sort after the built-ins). An empty query returns the whole registry, so a bare
/ lists every command including any the extensions added (never a hardcoded list).
Pure: takes the registry the caller already built via createCommandRegistry, so the menu automatically reflects extension commands without this layer knowing they exist.
Parameters
Section titled “Parameters”registry
Section titled “registry”string