Skip to content

Commit b44a3ce

Browse files
committed
Address PR review comments: add PythonExecutionApi description, note envId is autogenerated/immutable, and fill in Copilot Tooling section
1 parent bd8db4f commit b44a3ce

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

docs/design.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Python Environments API
32
The following guide describes the technical design of the Python Environments Extension. Its intended use is mainly for contributing extension authors. This extension is the entry point which will surface the entire environment management experience for Python in VS Code and its modularity should allow for individual tools / libraries to implement these methods for their tool making them usable in VS Code.
43

@@ -29,7 +28,7 @@ The Python Environments extension has four main functionalities:
2928

3029
## API Surface
3130
- **PythonProjectApi** -> The API for interacting with Python projects.
32-
- **PythonExecutionApi**
31+
- **PythonExecutionApi** -> The API for running code (experimental)
3332
- **PythonEnvironmentApi** -> The API for interacting with Python environments, package
3433
- **PythonEnvironmentManagerApi**
3534
- **PythonPackageManagerApi**
@@ -64,11 +63,11 @@ The relationship between **workspaces** and **environments** in the extension ca
6463
| m | 1 | multiroot workspace, single environment | covered in m:n scenario |
6564

6665

67-
`PythonEnvironment` describes a unique python environment that is identified by its `PythonEnvironmentId` a property containing the `id` of the environment and the `managerId`. A `PythonEnvironment` object can contain many attributes included in the code block below. Note `execInfo` of type `PythonEnvironmentExecutionInfo` contains information on both terminal activation for a given environment and code execution. The group attribute can be used to provide differentiation between environments from the same manager, such as named vs unnamed conda environments.
66+
`PythonEnvironment` describes a unique python environment that is identified by its `PythonEnvironmentId` a property containing the `id` of the environment and the `managerId`. The `envId` is autogenerated and immutable. A `PythonEnvironment` object can contain many attributes included in the code block below. Note `execInfo` of type `PythonEnvironmentExecutionInfo` contains information on both terminal activation for a given environment and code execution. The group attribute can be used to provide differentiation between environments from the same manager, such as named vs unnamed conda environments.
6867

6968
```
7069
PythonEnvironment
71-
- envId: PythonEnvironmentId; (unique identifier)
70+
- envId: PythonEnvironmentId; (unique identifier, autogenerated and immutable)
7271
- id: string;
7372
- managerId: string;
7473
- name: string;
@@ -125,7 +124,13 @@ Selectable by the Python logo icon and located by default in the sidepane, the P
125124

126125

127126
### Copilot Tooling
128-
xxxx
127+
The extension contributes language model tools that enable GitHub Copilot to interact with Python environments. These tools allow Copilot to:
128+
- Query and list available Python environments
129+
- Get information about the currently selected environment
130+
- Install and manage packages in environments
131+
- Create new environments and projects
132+
133+
This integration allows users to manage their Python environments through natural language conversations with Copilot in VS Code.
129134

130135
### Command Palette
131136

0 commit comments

Comments
 (0)