Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/vim-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ ESC is used for:

1. Exiting Vim normal mode (highest priority)
2. NOT used for canceling edits (use **Ctrl-Q** instead)
3. NOT used for interrupting streams (use **Ctrl-C** instead)
3. NOT used for interrupting streams (use **Ctrl-D** on Linux/Windows or **Ctrl-C** on macOS)

## Tips

Expand Down
4 changes: 2 additions & 2 deletions src/components/AIView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const AIViewInner: React.FC<AIViewProps> = ({
);

// Auto-retry state - minimal setter for keybinds and message sent handler
// RetryBarrier manages its own state, but we need this for Ctrl+C keybind
// RetryBarrier manages its own state, but we need this for interrupt keybind
const [, setAutoRetry] = usePersistedState<boolean>(getAutoRetryKey(workspaceId), true, {
listener: true,
});
Expand Down Expand Up @@ -259,7 +259,7 @@ const AIViewInner: React.FC<AIViewProps> = ({
const activeStreamMessageId = aggregator.getActiveStreamMessageId();

// Note: We intentionally do NOT reset autoRetry when streams start.
// If user pressed Ctrl+C, autoRetry stays false until they manually retry.
// If user pressed the interrupt key, autoRetry stays false until they manually retry.
// This makes state transitions explicit and predictable.

// Merge consecutive identical stream errors
Expand Down
2 changes: 1 addition & 1 deletion src/components/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ export const ChatInput: React.FC<ChatInputProps> = ({
}

// Note: ESC handled by VimTextArea (for mode transitions) and CommandSuggestions (for dismissal)
// Edit canceling is Ctrl+Q, stream interruption is Ctrl+C
// Edit canceling is Ctrl+Q, stream interruption is Ctrl+D (Linux/Win) or Ctrl+C (macOS)

// Don't handle keys if command suggestions are visible
if (
Expand Down
5 changes: 4 additions & 1 deletion src/utils/ui/keybinds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ export const KEYBINDS = {
CANCEL_EDIT: { key: "q", ctrl: true, macCtrlBehavior: "control" },

/** Interrupt active stream (destructive - stops AI generation) */
INTERRUPT_STREAM: { key: "c", ctrl: true, macCtrlBehavior: "control" },
// Ctrl+D on Linux/Windows (doesn't conflict with copy), Ctrl+C on macOS
INTERRUPT_STREAM: (isMac()
? { key: "c", ctrl: true, macCtrlBehavior: "control" }
: { key: "d", ctrl: true }) satisfies Keybind,

/** Accept partial compaction early (adds [truncated] sentinel) */
ACCEPT_EARLY_COMPACTION: { key: "a", ctrl: true, macCtrlBehavior: "control" },
Expand Down