mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Fix voice and notebook chat kb conflicts. (#208830)
This commit is contained in:
parent
1d122e94cf
commit
3e1b51e378
|
@ -53,6 +53,7 @@ import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
|
|||
import { ITerminalService } from 'vs/workbench/contrib/terminal/browser/terminal';
|
||||
import { ProgressLocation } from 'vs/platform/progress/common/progress';
|
||||
import { TerminalChatController, TerminalChatContextKeys } from 'vs/workbench/contrib/terminal/browser/terminalContribExports';
|
||||
import { NOTEBOOK_EDITOR_FOCUSED } from 'vs/workbench/contrib/notebook/common/notebookContextKeys';
|
||||
|
||||
const CONTEXT_VOICE_CHAT_GETTING_READY = new RawContextKey<boolean>('voiceChatGettingReady', false, { type: 'boolean', description: localize('voiceChatGettingReady', "True when getting ready for receiving voice input from the microphone for voice chat.") });
|
||||
const CONTEXT_VOICE_CHAT_IN_PROGRESS = new RawContextKey<boolean>('voiceChatInProgress', false, { type: 'boolean', description: localize('voiceChatInProgress', "True when voice recording from microphone is in progress for voice chat.") });
|
||||
|
@ -524,7 +525,8 @@ export class HoldToVoiceChatInChatViewAction extends Action2 {
|
|||
when: ContextKeyExpr.and(
|
||||
CanVoiceChat,
|
||||
FocusInChatInput.negate(), // when already in chat input, disable this action and prefer to start voice chat directly
|
||||
EditorContextKeys.focus.negate() // do not steal the inline-chat keybinding
|
||||
EditorContextKeys.focus.negate(), // do not steal the inline-chat keybinding
|
||||
NOTEBOOK_EDITOR_FOCUSED.negate() // do not steal the notebook keybinding
|
||||
),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KeyI
|
||||
}
|
||||
|
@ -607,6 +609,7 @@ export class StartVoiceChatAction extends Action2 {
|
|||
when: ContextKeyExpr.and(
|
||||
FocusInChatInput, // scope this action to chat input fields only
|
||||
EditorContextKeys.focus.negate(), // do not steal the inline-chat keybinding
|
||||
NOTEBOOK_EDITOR_FOCUSED.negate(), // do not steal the notebook keybinding
|
||||
CONTEXT_VOICE_CHAT_IN_VIEW_IN_PROGRESS.negate(),
|
||||
CONTEXT_QUICK_VOICE_CHAT_IN_PROGRESS.negate(),
|
||||
CONTEXT_VOICE_CHAT_IN_EDITOR_IN_PROGRESS.negate(),
|
||||
|
|
Loading…
Reference in a new issue