()
| 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({ |
no outgoing calls
no test coverage detected