Skip to content

Commit cffd0cf

Browse files
Update pythonEnvironmentsApi/src/main.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7b7cc58 commit cffd0cf

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

pythonEnvironmentsApi/src/main.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,12 @@ export interface EnvironmentManager {
455455
* - Selects an environment in the environment picker or clicks the checkmark button in the tree view.
456456
* - Creates a new environment and the extension auto-selects it.
457457
*
458-
* Also called at extension startup during initial environment selection to cache the active
459-
* environment, and when a Python project is removed (with `environment` set to `undefined`).
458+
* Also called at extension startup during initial environment selection to initialize or
459+
* reconcile the active environment state. This startup call may pass the already-persisted or
460+
* previously-selected environment; implementations should treat it as idempotent and avoid
461+
* unnecessary work or side effects, including firing change events, unless the selected
462+
* environment actually changes. Also called when a Python project is removed (with
463+
* `environment` set to `undefined`).
460464
*/
461465
set(scope: SetEnvironmentScope, environment?: PythonEnvironment): Promise<void>;
462466

0 commit comments

Comments
 (0)