You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: package.json
+37-7
Original file line number
Diff line number
Diff line change
@@ -491,22 +491,52 @@
491
491
],
492
492
"languageModelTools": [
493
493
{
494
-
"name": "python_get_packages",
495
-
"displayName": "Get Python Packages",
496
-
"modelDescription": "Returns the packages installed in the given Python file's environment. You should call this when you want to generate Python code to determine the users preferred packages. Also call this to determine if you need to provide installation instructions in a response.",
"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.",
497
+
"toolReferenceName": "pythonGetEnvironmentInfo",
498
498
"tags": [],
499
499
"icon": "$(files)",
500
+
"canBeReferencedInPrompt": true,
500
501
"inputSchema": {
501
502
"type": "object",
502
503
"properties": {
503
-
"filePath": {
504
+
"resourcePath": {
504
505
"type": "string"
505
506
}
506
507
},
507
-
"description": "The path to the Python file or workspace to get the installed packages for.",
508
+
"description": "The path to the Python file or workspace to get the environment information for.",
508
509
"required": [
509
-
"filePath"
510
+
"resourcePath"
511
+
]
512
+
}
513
+
},
514
+
{
515
+
"name": "python_install_package_tool",
516
+
"displayName": "Install Python Package",
517
+
"modelDescription": "Installs Python packages in the given workspace. Use this tool to install packages in the user's chosen environment.",
518
+
"toolReferenceName": "pythonInstallPackage",
519
+
"tags": [],
520
+
"icon": "$(package)",
521
+
"canBeReferencedInPrompt": true,
522
+
"inputSchema": {
523
+
"type": "object",
524
+
"properties": {
525
+
"packageList": {
526
+
"type": "array",
527
+
"items": {
528
+
"type": "string"
529
+
},
530
+
"description": "The list of packages to install."
531
+
},
532
+
"workspacePath": {
533
+
"type": "string",
534
+
"description": "Path to Python workspace that determines the environment for package installation."
// Create a formatted string that looks like JSON but preserves comments
135
+
letenvTypeDescriptor: string=`This environment is managed by ${envInfo.type} environment manager. Use the install tool to install packages into this environment.`;
136
+
137
+
if(envInfo.type==='system'){
138
+
envTypeDescriptor=
139
+
'System pythons are pythons that ship with the OS or are installed globally. These python installs may be used by the OS for running services and core functionality. Confirm with the user before installing packages into this environment, as it can lead to issues with any services on the OS.';
// Installed Python packages, each in the format <name> or <name> (<version>). The version may be omitted if unknown. Returns an empty array if no packages are installed.
0 commit comments