Skip to content

Commit 3251861

Browse files
committed
sync apis
1 parent cffd0cf commit 3251861

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

pythonEnvironmentsApi/src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,9 @@ export interface EnvironmentManager {
399399
*
400400
* @remarks
401401
* Called when the user:
402-
* - Runs the "Python: Create Environment" command (which prompts for a manager to use).
403-
* - Clicks the "+" button on an environment manager in the Python Environments view.
404-
* - Creates a new environment as part of the new Python package project creation wizard.
402+
* - Invokes the `python.createEnvironment` command (which prompts for a manager to use).
403+
* - Uses the add-environment action for an environment manager in the Python Environments view.
404+
* - Creates a new environment as part of a Python package project creation flow.
405405
*/
406406
create?(scope: CreateEnvironmentScope, options?: CreateEnvironmentOptions): Promise<PythonEnvironment | undefined>;
407407

src/api.ts

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

0 commit comments

Comments
 (0)