Skip to content

Commit ccafdc3

Browse files
committed
Fixes to getting conda packages and localize tool message
1 parent 35d5997 commit ccafdc3

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@
510510
"languageModelTools": [
511511
{
512512
"name": "python_environment",
513-
"userDescription": "Get Python environment info for a file or path, including version, packages, and the command to run it.",
513+
"userDescription": "%python.languageModelTools.python_environment.userDescription%",
514514
"displayName": "Get Python Environment Information",
515515
"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.",
516516
"toolReferenceName": "pythonGetEnvironmentInfo",
@@ -535,7 +535,7 @@
535535
{
536536
"name": "python_install_package",
537537
"displayName": "Install Python Package",
538-
"userDescription": "Installs Python packages in the given workspace",
538+
"userDescription": "%python.languageModelTools.python_install_package.userDescription%",
539539
"modelDescription": "Installs Python packages in the given workspace. Use this tool to install packages in the user's chosen environment.",
540540
"toolReferenceName": "pythonInstallPackage",
541541
"tags": [

package.nls.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@
3333
"python-envs.runAsTask.title": "Run as Task",
3434
"python-envs.terminal.activate.title": "Activate Environment in Current Terminal",
3535
"python-envs.terminal.deactivate.title": "Deactivate Environment in Current Terminal",
36-
"python-envs.uninstallPackage.title": "Uninstall Package"
37-
}
36+
"python-envs.uninstallPackage.title": "Uninstall Package",
37+
"python.languageModelTools.python_environment.userDescription": "Get Python environment info for a file or path, including version, packages, and the command to run it.",
38+
"python.languageModelTools.python_install_package.userDescription": "Installs Python packages in the given workspace."
39+
}

src/managers/conda/condaUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ export async function refreshPackages(
881881
const packages: Package[] = [];
882882
content.forEach((l) => {
883883
const parts = l.split(' ').filter((p) => p.length > 0);
884-
if (parts.length === 3) {
884+
if (parts.length >= 3) {
885885
const pkg = api.createPackageItem(
886886
{
887887
name: parts[0],

0 commit comments

Comments
 (0)