Skip to content

Commit 246d5e7

Browse files
authored
1 parent bc56bce commit 246d5e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ export class StartSessionAction extends EditorAction2 {
4343
title: { value: LOCALIZED_START_INLINE_CHAT_STRING, original: 'Start Inline Chat' },
4444
category: AbstractInlineChatAction.category,
4545
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()),
4747
keybinding: {
48+
when: EditorContextKeys.focus,
4849
weight: KeybindingWeight.WorkbenchContrib,
4950
primary: KeyMod.CtrlCmd | KeyCode.KeyI,
5051
secondary: [KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyI)],
@@ -506,9 +507,8 @@ export class ToggleInlineDiff extends AbstractInlineChatAction {
506507
title: localize('showDiff2', "Show Diff"),
507508
mnemonicTitle: localize({ key: 'miShowDiff2', comment: ['&& denotes a mnemonic'] }, "&&Show Diff")
508509
},
509-
precondition: ContextKeyExpr.notEquals('config.inlineChat.mode', 'preview'),
510+
precondition: ContextKeyExpr.and(CTX_INLINE_CHAT_VISIBLE, CTX_INLINE_CHAT_EDIT_MODE.isEqualTo(EditMode.Live)),
510511
menu: [
511-
{ id: MenuId.CommandPalette },
512512
{ id: MENU_INLINE_CHAT_WIDGET_TOGGLE }
513513
]
514514
});

0 commit comments

Comments
 (0)