(value: string)
| 238 | ) |
| 239 | |
| 240 | const submitInput = (value: string) => { |
| 241 | const prompt = value.trim() |
| 242 | setInput("") |
| 243 | |
| 244 | if (!prompt || busy) { |
| 245 | return |
| 246 | } |
| 247 | |
| 248 | if (prompt.startsWith("/")) { |
| 249 | void runCommand(prompt) |
| 250 | return |
| 251 | } |
| 252 | |
| 253 | void sendPrompt(prompt) |
| 254 | } |
| 255 | |
| 256 | const runCommand = async (rawCommand: string) => { |
| 257 | const command = getSlashCommand(rawCommand) |
nothing calls this directly
no test coverage detected