Skip to content

Update "Interpreter" command palette actions #7803

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class UnsupportedPythonVersionService extends BaseDiagnosticsService {
prompt: Common.selectNewSession,
command: commandFactory.createCommand(diagnostic, {
type: 'executeVSCCommand',
options: 'workbench.action.language.runtime.openActivePicker',
options: 'workbench.action.language.runtime.selectSession',
}),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ interface ICommandNameWithoutArgumentTypeMapping {
// --- Start Positron ---
[Commands.Show_Interpreter_Debug_Info]: [];
// New command that opens the multisession interpreter picker
['workbench.action.language.runtime.openActivePicker']: [];
['workbench.action.language.runtime.selectSession']: [];
// --- End Positron ---
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { ActionBarCommandButton } from '../../../../../platform/positronActionBa
import { CommandCenter } from '../../../../../platform/commandCenter/common/commandCenter.js';
import { ILanguageRuntimeSession } from '../../../../services/runtimeSession/common/runtimeSessionService.js';
import { localize } from '../../../../../nls.js';
import { LANGUAGE_RUNTIME_SELECT_SESSION_ID, LANGUAGE_RUNTIME_START_NEW_SESSION_ID } from '../../../../contrib/languageRuntime/browser/languageRuntimeActions.js';

const startSession = localize('positron.console.startSession', "Start Session");

Expand All @@ -38,8 +39,8 @@ export const TopActionBarSessionManager = () => {
const hasActiveConsoleSessions = context.runtimeSessionService.activeSessions.find(
session => session.metadata.sessionMode === LanguageRuntimeSessionMode.Console);
const command = hasActiveConsoleSessions
? 'workbench.action.language.runtime.openActivePicker'
: 'workbench.action.language.runtime.openStartPicker';
? LANGUAGE_RUNTIME_SELECT_SESSION_ID
: LANGUAGE_RUNTIME_START_NEW_SESSION_ID;

// Main useEffect.
useEffect(() => {
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/common/contextkeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export const PositronTopActionBarFocused = new RawContextKey<boolean>('positronT
export const PositronTopActionBarVisibleContext = new RawContextKey<boolean>('positronTopActionBarVisible', true, localize('positronTopActionBarVisible', "Whether Positron Top Action Bar is visible"));
export const PositronConsoleFocused = new RawContextKey<boolean>('positronConsoleFocused', false, localize('positronConsoleFocused', "Whether Positron Console has keyboard focus"));
export const PositronConsoleTabFocused = new RawContextKey<boolean>('positronConsoleTabFocused', false, localize('positronConsoleTabFocused', "Whether Positron Console Tab has keyboard focus"));
export const PositronConsoleInstancesExistContext = new RawContextKey<boolean>('positronConsoleInstancesExist', false, localize('positronConsoleInstancesExist', "Whether any Positron Console instances exist"));
export const PositronVariablesFocused = new RawContextKey<boolean>('positronVariablesFocused', false, localize('positronVariablesFocused', "Whether Positron Variables has keyboard focus"));
export const PositronHelpFocused = new RawContextKey<boolean>('positronHelpFocused', false, localize('positronHelpFocused', "Whether Positron Help has keyboard focus"));
export const PositronDataExplorerFocused = new RawContextKey<boolean>('positronDataExplorerFocused', false, localize('positronDataExplorerFocused', "Whether Positron Data Explorer has keyboard focus"));
Expand Down
Loading
Loading