@@ -43,8 +43,9 @@ export class StartSessionAction extends EditorAction2 {
43
43
title : { value : LOCALIZED_START_INLINE_CHAT_STRING , original : 'Start Inline Chat' } ,
44
44
category : AbstractInlineChatAction . category ,
45
45
f1 : true ,
46
- precondition : ContextKeyExpr . and ( CTX_INLINE_CHAT_HAS_PROVIDER , CTX_INLINE_CHAT_VISIBLE . toNegated ( ) , EditorContextKeys . focus ) ,
46
+ precondition : ContextKeyExpr . and ( CTX_INLINE_CHAT_HAS_PROVIDER , CTX_INLINE_CHAT_VISIBLE . toNegated ( ) ) ,
47
47
keybinding : {
48
+ when : EditorContextKeys . focus ,
48
49
weight : KeybindingWeight . WorkbenchContrib ,
49
50
primary : KeyMod . CtrlCmd | KeyCode . KeyI ,
50
51
secondary : [ KeyChord ( KeyMod . CtrlCmd | KeyCode . KeyK , KeyCode . KeyI ) ] ,
@@ -506,9 +507,8 @@ export class ToggleInlineDiff extends AbstractInlineChatAction {
506
507
title : localize ( 'showDiff2' , "Show Diff" ) ,
507
508
mnemonicTitle : localize ( { key : 'miShowDiff2' , comment : [ '&& denotes a mnemonic' ] } , "&&Show Diff" )
508
509
} ,
509
- precondition : ContextKeyExpr . notEquals ( 'config.inlineChat.mode' , 'preview' ) ,
510
+ precondition : ContextKeyExpr . and ( CTX_INLINE_CHAT_VISIBLE , CTX_INLINE_CHAT_EDIT_MODE . isEqualTo ( EditMode . Live ) ) ,
510
511
menu : [
511
- { id : MenuId . CommandPalette } ,
512
512
{ id : MENU_INLINE_CHAT_WIDGET_TOGGLE }
513
513
]
514
514
} ) ;
0 commit comments