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

Function getCommandIcon

src/components/SlashCommandPicker.tsx:47–63  ·  view source on GitHub ↗
(command: SlashCommand)

Source from the content-addressed store, hash-verified

45
46// Get icon for command based on its properties
47const getCommandIcon = (command: SlashCommand) => {
48 // If it has bash commands, show terminal icon
49 if (command.has_bash_commands) return Terminal;
50
51 // If it has file references, show file icon
52 if (command.has_file_references) return FileCode;
53
54 // If it accepts arguments, show zap icon
55 if (command.accepts_arguments) return Zap;
56
57 // Based on scope
58 if (command.scope === "project") return FolderOpen;
59 if (command.scope === "user") return Globe;
60
61 // Default
62 return Command;
63};
64
65/**
66 * SlashCommandPicker component - Autocomplete UI for slash commands

Callers 1

SlashCommandPickerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected