Skip to content

Commit 9e6699e

Browse files
authored
🤖 fix: add Ctrl+I focus keybind to new chat page (#1102)
The new chat page (workspace creation flow) displays "⌘I to focus" but the keybind wasn't actually registered there. **Problem:** The `FOCUS_CHAT` keybind handler was only in `useAIViewKeybinds` (used by `AIView.tsx` for existing workspaces), but not in `App.tsx` where the creation variant of ChatInput is rendered. **Fix:** Added the `FOCUS_CHAT` keybind to App.tsx's global keydown handler, which focuses the creation chat input when on the new chat page. _Generated with `mux`_
1 parent 04231ce commit 9e6699e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/browser/App.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,12 @@ function AppInner() {
447447
} else if (matchesKeybind(e, KEYBINDS.OPEN_SETTINGS)) {
448448
e.preventDefault();
449449
openSettings();
450+
} else if (matchesKeybind(e, KEYBINDS.FOCUS_CHAT)) {
451+
// Focus creation chat when on new chat page (no workspace selected)
452+
if (creationProjectPath && creationChatInputRef.current) {
453+
e.preventDefault();
454+
creationChatInputRef.current.focus();
455+
}
450456
}
451457
};
452458

@@ -458,6 +464,7 @@ function AppInner() {
458464
isCommandPaletteOpen,
459465
closeCommandPalette,
460466
openCommandPalette,
467+
creationProjectPath,
461468
openSettings,
462469
]);
463470

0 commit comments

Comments
 (0)