MCPcopy Index your code
hub / github.com/winfunc/opcode / loadCommands

Function loadCommands

src/components/SlashCommandPicker.tsx:214–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

212 }, [selectedIndex]);
213
214 const loadCommands = async () => {
215 try {
216 setIsLoading(true);
217 setError(null);
218
219 // Always load fresh commands from filesystem
220 const loadedCommands = await api.slashCommandsList(projectPath);
221 setCommands(loadedCommands);
222 } catch (err) {
223 console.error("Failed to load slash commands:", err);
224 setError(err instanceof Error ? err.message : 'Failed to load commands');
225 setCommands([]);
226 } finally {
227 setIsLoading(false);
228 }
229 };
230
231 const handleCommandClick = (command: SlashCommand) => {
232 trackEvent.slashCommandSelected({

Callers 1

SlashCommandPickerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected