From 3d40a1cbf2421419ee011095678c423cbe22a0bf Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Mon, 13 Jul 2026 17:51:50 -0400 Subject: [PATCH] feat(desktop): Cursor-style stop-and-correct on the composer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plain Enter (and the primary send button) while a turn is running now redirects the live turn with the typed correction instead of queueing it — matching Cursor's stop-and-correct. Removes the now-redundant steering-wheel button (redirect is the default gesture) and teaches the primary button the `steer` action. Attachments still queue; slash commands still run inline. --- .../src/app/chat/composer/controls.tsx | 46 ++++--------------- .../composer/hooks/use-composer-submit.ts | 19 +++++--- apps/desktop/src/app/chat/composer/index.tsx | 8 ++-- 3 files changed, 25 insertions(+), 48 deletions(-) diff --git a/apps/desktop/src/app/chat/composer/controls.tsx b/apps/desktop/src/app/chat/composer/controls.tsx index 7852ee81ef56..314bbd4c89cc 100644 --- a/apps/desktop/src/app/chat/composer/controls.tsx +++ b/apps/desktop/src/app/chat/composer/controls.tsx @@ -1,11 +1,9 @@ import { Button } from '@/components/ui/button' import { Codicon } from '@/components/ui/codicon' -import { KbdCombo } from '@/components/ui/kbd' import { Tip } from '@/components/ui/tooltip' import { useI18n } from '@/i18n' import { triggerHaptic } from '@/lib/haptics' -import { AudioLines, iconSize, Layers3, Loader2, Square, SteeringWheel, Volume2, VolumeX } from '@/lib/icons' -import { formatCombo } from '@/lib/keybinds/combo' +import { AudioLines, iconSize, Layers3, Loader2, Square, Volume2, VolumeX } from '@/lib/icons' import { cn } from '@/lib/utils' import type { ConversationStatus } from './hooks/use-voice-conversation' @@ -42,7 +40,6 @@ export function ComposerControls({ autoSpeak, busy, busyAction, - canSteer, canSubmit, compactModelPill = false, conversation, @@ -51,13 +48,11 @@ export function ComposerControls({ state, voiceStatus, onDictate, - onSteer, onToggleAutoSpeak }: { autoSpeak: boolean busy: boolean - busyAction: 'queue' | 'stop' - canSteer: boolean + busyAction: 'steer' | 'queue' | 'stop' canSubmit: boolean compactModelPill?: boolean conversation: ConversationProps @@ -66,49 +61,24 @@ export function ComposerControls({ state: ChatBarState voiceStatus: VoiceStatus onDictate: () => void - onSteer: () => void onToggleAutoSpeak: () => void }) { const { t } = useI18n() const c = t.composer - const steerCombo = formatCombo('mod+enter') - const steerLabel = `${c.steer} (${steerCombo})` - - const steerTip = ( - - {c.steer} - - - ) if (conversation.active) { return } const showVoicePrimary = !busy && !hasComposerPayload + // steer + stop both interrupt the live turn (the difference is whether a + // correction rides along), so they share the stop glyph; only queue differs. + const busyLabel = busyAction === 'queue' ? c.queueMessage : busyAction === 'steer' ? c.steer : c.stop return (
- {/* While the agent runs and the user is typing, steer takes over the mic's - slot rather than crowding the row with an extra button. */} - {canSteer ? ( - - - - ) : ( - - )} + {showVoicePrimary ? ( @@ -127,9 +97,9 @@ export function ComposerControls({ ) : ( - +