Skip to content

Commit

Permalink
Making the editor toolbar sparkle icon appear on focus of the editor …
Browse files Browse the repository at this point in the history
…and when the inline chat is not visible yet (#198458)

changed the condition for the sparkle to appear
  • Loading branch information
aiday-mar committed Nov 17, 2023
1 parent 7b9833b commit edc4698
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class StartSessionAction extends EditorAction2 {
title: { value: LOCALIZED_START_INLINE_CHAT_STRING, original: 'Start Inline Chat' },
category: AbstractInlineChatAction.category,
f1: true,
precondition: ContextKeyExpr.and(CTX_INLINE_CHAT_HAS_PROVIDER, EditorContextKeys.writable),
precondition: ContextKeyExpr.and(CTX_INLINE_CHAT_HAS_PROVIDER, CTX_INLINE_CHAT_VISIBLE.toNegated(), EditorContextKeys.focus),
keybinding: {
weight: KeybindingWeight.WorkbenchContrib,
primary: KeyMod.CtrlCmd | KeyCode.KeyI,
Expand All @@ -52,7 +52,7 @@ export class StartSessionAction extends EditorAction2 {
icon: START_INLINE_CHAT,
menu: [{
id: MenuId.EditorTitle,
when: ContextKeyExpr.and(CTX_INLINE_CHAT_HAS_PROVIDER, EditorContextKeys.writable),
when: ContextKeyExpr.and(CTX_INLINE_CHAT_HAS_PROVIDER, CTX_INLINE_CHAT_VISIBLE.toNegated(), EditorContextKeys.focus),
group: 'navigation',
order: -1000000, // at the very front
}],
Expand Down

0 comments on commit edc4698

Please sign in to comment.