diff --git a/packages/ui/src/components/chat/ChatInput.tsx b/packages/ui/src/components/chat/ChatInput.tsx index 9fdee983..4a9147b6 100644 --- a/packages/ui/src/components/chat/ChatInput.tsx +++ b/packages/ui/src/components/chat/ChatInput.tsx @@ -575,7 +575,7 @@ export const ChatInput: React.FC = ({ onOpenSettings, scrollToBo } } - if (e.key === 'Tab' && !showCommandAutocomplete && !showFileMention) { + if (e.key === 'Tab' && e.shiftKey && !showCommandAutocomplete && !showAgentAutocomplete && !showFileMention) { e.preventDefault(); cycleAgent(); return; diff --git a/packages/ui/src/components/ui/HelpDialog.tsx b/packages/ui/src/components/ui/HelpDialog.tsx index 89c3ece2..5c3567b6 100644 --- a/packages/ui/src/components/ui/HelpDialog.tsx +++ b/packages/ui/src/components/ui/HelpDialog.tsx @@ -10,6 +10,8 @@ import { useUIStore } from "@/stores/useUIStore"; import { useConfigStore } from "@/stores/useConfigStore"; import { RiAddLine, + RiAiAgentLine, + RiAiGenerate2, RiArrowUpSLine, RiBrainAi3Line, RiCloseCircleLine, @@ -106,9 +108,19 @@ export const HelpDialog: React.FC = () => { description: "Toggle Session Sidebar", icon: RiLayoutLeftLine, }, + { + keys: ["Shift + Tab"], + description: "Cycle Agent (chat input)", + icon: RiAiAgentLine, + }, { keys: [`Shift + ${mod} + M`], description: "Open Model Selector", + icon: RiAiGenerate2, + }, + { + keys: [`Shift + ${mod} + T`], + description: "Cycle Thinking Variant", icon: RiBrainAi3Line, }, ], @@ -118,12 +130,12 @@ export const HelpDialog: React.FC = () => { items: [ { keys: [`${mod} + N`], - description: settingsAutoCreateWorktree ? "Create new session in worktree" : "Create New Session", + description: settingsAutoCreateWorktree ? "Create New Session in Worktree" : "Create New Session", icon: settingsAutoCreateWorktree ? RiGitBranchLine : RiAddLine, }, { keys: [`Shift + ${mod} + N`], - description: settingsAutoCreateWorktree ? "Create New Session" : "Create new session in worktree", + description: settingsAutoCreateWorktree ? "Create New Session" : "Create New Session in Worktree", icon: settingsAutoCreateWorktree ? RiAddLine : RiGitBranchLine, }, { keys: [`${mod} + I`], description: "Focus Chat Input", icon: RiText }, @@ -172,8 +184,8 @@ export const HelpDialog: React.FC = () => { ]; return ( - - + + @@ -184,67 +196,69 @@ export const HelpDialog: React.FC = () => { -
- {shortcuts.map((section) => ( -
-

- {section.category} -

-
- {section.items.map((shortcut, index) => ( -
-
- {shortcut.icon && ( - - )} - - {shortcut.description} - +
+
+ {shortcuts.map((section) => ( +
+

+ {section.category} +

+
+ {section.items.map((shortcut, index) => ( +
+
+ {shortcut.icon && ( + + )} + + {shortcut.description} + +
+
+ {(Array.isArray(shortcut.keys) + ? shortcut.keys + : shortcut.keys.split(" / ") + ).map((keyCombo: string, i: number) => ( + + {i > 0 && ( + + or + + )} + + {renderKeyCombo(keyCombo)} + + + ))} +
-
- {(Array.isArray(shortcut.keys) - ? shortcut.keys - : shortcut.keys.split(" / ") - ).map((keyCombo: string, i: number) => ( - - {i > 0 && ( - - or - - )} - - {renderKeyCombo(keyCombo)} - - - ))} -
-
- ))} + ))} +
-
- ))} -
+ ))} +
-
-
- -
-

Pro Tips:

-
    -
  • - • Use Command Palette ({mod} + K) to quickly access all - actions -
  • -
  • - • The 5 most recent sessions appear in the Command Palette -
  • -
  • - • Theme cycling remembers your preference across sessions -
  • -
+
+
+ +
+

Pro Tips:

+
    +
  • + • Use Command Palette ({mod} + K) to quickly access all + actions +
  • +
  • + • The 5 most recent sessions appear in the Command Palette +
  • +
  • + • Theme cycling remembers your preference across sessions +
  • +
+
diff --git a/packages/ui/src/hooks/useKeyboardShortcuts.ts b/packages/ui/src/hooks/useKeyboardShortcuts.ts index 8d9cc5be..2feb822e 100644 --- a/packages/ui/src/hooks/useKeyboardShortcuts.ts +++ b/packages/ui/src/hooks/useKeyboardShortcuts.ts @@ -171,6 +171,51 @@ export const useKeyboardShortcuts = () => { return; } + // Cmd/Ctrl+Shift+T: Cycle thinking variant (same gating as Shift+M) + if (hasModifier(e) && e.shiftKey && e.key.toLowerCase() === 't') { + const { + isSettingsDialogOpen, + isCommandPaletteOpen, + isHelpDialogOpen, + isSessionSwitcherOpen, + isAboutDialogOpen, + activeMainTab, + } = useUIStore.getState(); + + if (isSettingsDialogOpen) { + return; + } + + const hasOverlay = isCommandPaletteOpen || isHelpDialogOpen || isSessionSwitcherOpen || isAboutDialogOpen; + const isChatActive = activeMainTab === 'chat'; + + if (hasOverlay || !isChatActive) { + return; + } + + const configState = useConfigStore.getState(); + const variants = configState.getCurrentModelVariants(); + if (variants.length === 0) { + return; + } + + e.preventDefault(); + configState.cycleCurrentVariant(); + + const nextVariant = useConfigStore.getState().currentVariant; + const sessionState = useSessionStore.getState(); + const sessionId = sessionState.currentSessionId; + const agentName = useConfigStore.getState().currentAgentName; + const providerId = useConfigStore.getState().currentProviderId; + const modelId = useConfigStore.getState().currentModelId; + + if (sessionId && agentName && providerId && modelId) { + sessionState.saveAgentModelVariantForSession(sessionId, agentName, providerId, modelId, nextVariant); + } + + return; + } + if (e.key === 'Escape') { const { isSettingsDialogOpen,