MCPcopy Create free account
hub / github.com/cursor/cookbook / getSlashCommandItems

Function getSlashCommandItems

sdk/coding-agent-cli/src/commands.ts:38–48  ·  view source on GitHub ↗
(query: string)

Source from the content-addressed store, hash-verified

36}
37
38export function getSlashCommandItems(query: string) {
39 const normalizedQuery = query.trim().toLowerCase()
40
41 return slashCommands
42 .filter((command) => command.name.startsWith(normalizedQuery || "/"))
43 .map((command) => ({
44 key: command.name,
45 label: `${command.name} ${command.summary}`,
46 value: command.name,
47 }))
48}

Callers 1

AppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected