MCPcopy Create free account
hub / github.com/continuedev/continue / getAllSlashCommands

Function getAllSlashCommands

extensions/cli/src/commands/commands.ts:149–183  ·  view source on GitHub ↗
(
  assistant: AssistantConfig,
  options: { isRemoteMode?: boolean } = {},
)

Source from the content-addressed store, hash-verified

147 * Get all available slash commands including system commands and assistant prompts
148 */
149export async function getAllSlashCommands(
150 assistant: AssistantConfig,
151 options: { isRemoteMode?: boolean } = {},
152): Promise<SlashCommand[]> {
153 const { isRemoteMode = false } = options;
154
155 // In remote mode, only show the exit command
156 if (isRemoteMode) {
157 return REMOTE_MODE_SLASH_COMMANDS;
158 }
159
160 // All system commands are available
161 const systemCommands = SYSTEM_SLASH_COMMANDS;
162
163 // Get assistant prompt commands
164 const assistantCommands: SlashCommand[] =
165 assistant?.prompts?.map((prompt) => ({
166 name: prompt?.name || "",
167 description: prompt?.description || "",
168 category: "assistant" as const,
169 })) || [];
170
171 // Get invokable rule commands
172 const invokableRuleCommands = getInvokableRuleSlashCommands(assistant);
173
174 // Get skill commands
175 const skillCommands = await getSkillSlashCommands();
176
177 return [
178 ...systemCommands,
179 ...assistantCommands,
180 ...invokableRuleCommands,
181 ...skillCommands,
182 ];
183}
184
185/**
186 * Get assistant prompt commands only

Callers 4

handleSlashCommandsFunction · 0.85
loadCommandsFunction · 0.85
loadCommandsFunction · 0.85

Calls 2

getSkillSlashCommandsFunction · 0.85

Tested by

no test coverage detected