MCPcopy Create free account
hub / github.com/agent-tower/core / getSlashCommandQuery

Function getSlashCommandQuery

packages/web/src/components/task/slash-commands.ts:122–125  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

120}
121
122export function getSlashCommandQuery(input: string): string | null {
123 const match = input.match(/^\s*\/([^\s]*)$/)
124 return match ? normalizeSlashToken(match[1]) : null
125}
126
127export function filterSlashCommands(commands: SlashCommandOption[], query: string): SlashCommandOption[] {
128 return filterPromptCommands(commands, normalizeSlashToken(query))

Callers 2

useSlashCommandMenuFunction · 0.90

Calls 1

normalizeSlashTokenFunction · 0.85

Tested by

no test coverage detected