Skip to content

Commit b5e9aad

Browse files
moyucursoragent
andcommitted
fix: skip slash command echo in setUserInputOnProcessing to prevent UI flash
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d798e6a commit b5e9aad

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/utils/processUserInput/processUserInput.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,10 @@ export async function processUserInput({
146146
}): Promise<ProcessUserInputBaseResult> {
147147
const inputString = typeof input === 'string' ? input : null
148148
// Immediately show the user input prompt while we are still processing the input.
149-
// Skip for isMeta (system-generated prompts like scheduled tasks) — those
150-
// should run invisibly.
151-
if (mode === 'prompt' && inputString !== null && !isMeta) {
149+
// Skip for isMeta (system-generated prompts like scheduled tasks) and slash
150+
// commands (they produce their own system message echo via createCommandInputMessage).
151+
const isSlashInput = inputString?.startsWith('/') && !skipSlashCommands
152+
if (mode === 'prompt' && inputString !== null && !isMeta && !isSlashInput) {
152153
setUserInputOnProcessing?.(inputString)
153154
}
154155

0 commit comments

Comments
 (0)