Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions src/vs/workbench/contrib/terminal/browser/terminalMenus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,32 +521,6 @@ export function setupTerminalMenus(): void {
isHiddenByDefault: true
},
},
{
id: MenuId.ViewTitle,
item: {
command: {
id: TerminalCommandId.StartVoice,
title: localize('workbench.action.terminal.startVoice', "Start Dictation"),
},
group: 'navigation',
order: 9,
when: ContextKeyExpr.and(ContextKeyExpr.equals('view', TERMINAL_VIEW_ID), TerminalContextKeys.terminalDictationInProgress.toNegated()),
isHiddenByDefault: true
},
},
{
id: MenuId.ViewTitle,
item: {
command: {
id: TerminalCommandId.StopVoice,
title: localize('workbench.action.terminal.stopVoice', "Stop Dictation"),
},
group: 'navigation',
order: 9,
when: ContextKeyExpr.and(ContextKeyExpr.equals('view', TERMINAL_VIEW_ID), TerminalContextKeys.terminalDictationInProgress),
isHiddenByDefault: true
},
},
]
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import { IAction } from '../../../../../base/common/actions.js';
import { localize, localize2 } from '../../../../../nls.js';
import { MenuId } from '../../../../../platform/actions/common/actions.js';
import { ICommandService } from '../../../../../platform/commands/common/commands.js';
import { ContextKeyExpr, IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js';
import { IExtensionManagementService } from '../../../../../platform/extensionManagement/common/extensionManagement.js';
Expand All @@ -13,7 +14,7 @@ import { INotificationService, Severity } from '../../../../../platform/notifica
import { EnablementState, IWorkbenchExtensionEnablementService } from '../../../../services/extensionManagement/common/extensionManagement.js';
import { HasSpeechProvider, SpeechToTextInProgress } from '../../../speech/common/speechService.js';
import { registerActiveInstanceAction, sharedWhenClause } from '../../../terminal/browser/terminalActions.js';
import { TerminalCommandId } from '../../../terminal/common/terminal.js';
import { TERMINAL_VIEW_ID, TerminalCommandId } from '../../../terminal/common/terminal.js';
import { TerminalContextKeys } from '../../../terminal/common/terminalContextKey.js';
import { TerminalVoiceSession } from './terminalVoice.js';

Expand Down Expand Up @@ -73,7 +74,15 @@ export function registerTerminalVoiceActions() {
}, learnMoreAction);
}
notificationService.notify({ severity: Severity.Info, message, actions: { primary: actions } });
}
},
menu: [
{
id: MenuId.ViewTitle,
group: 'voice',
Comment thread
meganrogge marked this conversation as resolved.
when: ContextKeyExpr.and(ContextKeyExpr.equals('view', TERMINAL_VIEW_ID), TerminalContextKeys.terminalDictationInProgress.toNegated()),
isHiddenByDefault: true
},
]
});

registerActiveInstanceAction({
Expand All @@ -84,6 +93,14 @@ export function registerTerminalVoiceActions() {
run: (activeInstance, c, accessor) => {
const instantiationService = accessor.get(IInstantiationService);
TerminalVoiceSession.getInstance(instantiationService).stop(true);
}
},
menu: [
{
id: MenuId.ViewTitle,
group: 'voice',
when: ContextKeyExpr.and(ContextKeyExpr.equals('view', TERMINAL_VIEW_ID), TerminalContextKeys.terminalDictationInProgress),
Comment thread
meganrogge marked this conversation as resolved.
isHiddenByDefault: true
},
]
});
}
Loading