feat(interpreters): add an existing Python virtual environment as an interpreter (#2076)

Refs #1907

Add Python Interpreter → Existing environment: Browse picks the environment folder, which is resolved right away (pyvenv.cfg, bin/python or Scripts\python.exe) and added to the interpreter list as "Python X.Y (<env name>)", then remembered. Picking the folder rather than the executable keeps the environment's identity, since the native file picker resolves the venv's python symlink to the base interpreter. Works for `python -m venv` and uv environments; a broken environment shows an error instead of being added. Probing runs off the command thread.

Co-authored-by: Inf1mum <[email protected]>
Цей коміт міститься в:
Vadim LazukтаInf1mum authored and GitHub committed 2026-11-08 09:32:37 +08:00
1 джерело 9673ccc687
коміт 32a778d28d
13 files changed
+430 -25

No files matched your search

+2
Переглянути файл
@@ -20,6 +20,7 @@ export interface SelectOption<V extends string = string> {
}
export interface SelectProps<V extends string = string> {
id?: string;
value: V | null;
options: readonly SelectOption<V>[];
onChange: (value: V) => void;
@@ -177,6 +178,7 @@ export function Select<V extends string = string>({
<>
<button
ref={triggerRef}
id={aria.id}
type="button"
aria-haspopup="listbox"
aria-expanded={open}