@@ -34,6 +34,7 @@ import { IChatDetail, IChatService } from 'vs/workbench/contrib/chat/common/chat
3434import { IChatWidgetHistoryService } from 'vs/workbench/contrib/chat/common/chatWidgetHistoryService' ;
3535import { IEditorService } from 'vs/workbench/services/editor/common/editorService' ;
3636import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle' ;
37+ import { IsLinuxContext , IsWindowsContext } from 'vs/platform/contextkey/common/contextkeys' ;
3738
3839export const CHAT_CATEGORY = localize2 ( 'chat.category' , 'Chat' ) ;
3940export const CHAT_OPEN_ACTION_ID = 'workbench.action.chat.open' ;
@@ -192,13 +193,22 @@ export function registerChatActions() {
192193 super ( {
193194 id : 'chat.action.focus' ,
194195 title : localize2 ( 'actions.interactiveSession.focus' , 'Focus Chat List' ) ,
195- precondition : ContextKeyExpr . and ( CONTEXT_IN_CHAT_INPUT , CONTEXT_CHAT_INPUT_CURSOR_AT_TOP ) ,
196+ precondition : CONTEXT_IN_CHAT_INPUT ,
196197 category : CHAT_CATEGORY ,
197- keybinding : {
198- when : EditorContextKeys . textInputFocus ,
199- primary : KeyMod . CtrlCmd | KeyCode . UpArrow ,
200- weight : KeybindingWeight . EditorContrib
201- }
198+ keybinding : [
199+ // On mac, require that the cursor is at the top of the input, to avoid stealing cmd+up to move the cursor to the top
200+ {
201+ when : CONTEXT_CHAT_INPUT_CURSOR_AT_TOP ,
202+ primary : KeyMod . CtrlCmd | KeyCode . UpArrow ,
203+ weight : KeybindingWeight . EditorContrib ,
204+ } ,
205+ // On win/linux, ctrl+up can always focus the chat list
206+ {
207+ when : ContextKeyExpr . or ( IsWindowsContext , IsLinuxContext ) ,
208+ primary : KeyMod . CtrlCmd | KeyCode . UpArrow ,
209+ weight : KeybindingWeight . EditorContrib ,
210+ }
211+ ]
202212 } ) ;
203213 }
204214
0 commit comments