Skip to content
Merged
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@
"languageModelTools": [
{
"name": "python_environment",
"userDescription": "Get Python environment info for a file or path, including version, packages, and the command to run it.",
"userDescription": "%python.languageModelTools.python_environment.userDescription%",
"displayName": "Get Python Environment Information",
"modelDescription": "Provides details about the Python environment for a specified file or workspace, including environment type, Python version, run command, and installed packages with their versions. Use this tool to determine the correct command for executing Python code in this workspace.",
"toolReferenceName": "pythonGetEnvironmentInfo",
Expand All @@ -535,7 +535,7 @@
{
"name": "python_install_package",
"displayName": "Install Python Package",
"userDescription": "Installs Python packages in the given workspace",
"userDescription": "%python.languageModelTools.python_install_package.userDescription%",
"modelDescription": "Installs Python packages in the given workspace. Use this tool to install packages in the user's chosen environment.",
"toolReferenceName": "pythonInstallPackage",
"tags": [
Expand Down
6 changes: 4 additions & 2 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@
"python-envs.runAsTask.title": "Run as Task",
"python-envs.terminal.activate.title": "Activate Environment in Current Terminal",
"python-envs.terminal.deactivate.title": "Deactivate Environment in Current Terminal",
"python-envs.uninstallPackage.title": "Uninstall Package"
}
"python-envs.uninstallPackage.title": "Uninstall Package",
"python.languageModelTools.python_environment.userDescription": "Get Python environment info for a file or path, including version, packages, and the command to run it.",
"python.languageModelTools.python_install_package.userDescription": "Installs Python packages in the given workspace."
}
2 changes: 1 addition & 1 deletion src/managers/conda/condaUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ export async function refreshPackages(
const packages: Package[] = [];
content.forEach((l) => {
const parts = l.split(' ').filter((p) => p.length > 0);
if (parts.length === 3) {
if (parts.length >= 3) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karthiknadig on my machine this is what I get

❯ /Users/donjayamanne/miniforge3/bin/conda list -p /Users/donjayamanne/demo/.conda
# packages in environment at /Users/donjayamanne/demo/.conda:
#
# Name                    Version                   Build  Channel
appnope                   0.1.4              pyhd8ed1ab_1    conda-forge
asttokens                 3.0.0              pyhd8ed1ab_1    conda-forge
brotli-python             1.1.0           py313h3579c5c_2    conda-forge
bzip2                     1.0.8                h99b78c6_7    conda-forge
ca-certificates           2025.4.26            hbd8a1cb_0    conda-forge
certifi                   2025.4.26          pyhd8ed1ab_0    conda-forge
cffi                      1.17.1          py313hc845a76_0    conda-forge
charset-normalizer        3.4.2              pyhd8ed1ab_0    conda-forge
comm                      0.2.2              pyhd8ed1ab_1    conda-forge
debugpy                   1.8.14          py313h928ef07_0    conda-forge

const pkg = api.createPackageItem(
{
name: parts[0],
Expand Down