(command: SlashCommand)
| 45 | |
| 46 | // Get icon for command based on its properties |
| 47 | const 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 |
no outgoing calls
no test coverage detected