MCPcopy
hub / github.com/cursor/cookbook / submitInput

Function submitInput

sdk/coding-agent-cli/src/tui/App.tsx:240–254  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 2

sendPromptFunction · 0.85
runCommandFunction · 0.70

Tested by

no test coverage detected