|
25 | 25 | } |
26 | 26 | }, |
27 | 27 | "activationEvents": [ |
28 | | - "onLanguage:python", |
29 | | - "onLanguageModelTool:get_python_environment_info", |
30 | | - "onLanguageModelTool:get_python_executable_info", |
31 | | - "onLanguageModelTool:install_python_package", |
32 | | - "onLanguageModelTool:create_quick_virtual_environment" |
| 28 | + "onLanguage:python" |
33 | 29 | ], |
34 | 30 | "homepage": "https://github.com/microsoft/vscode-python-environments", |
35 | 31 | "repository": { |
|
516 | 512 | { |
517 | 513 | "type": "python" |
518 | 514 | } |
519 | | - ], |
520 | | - "languageModelTools": [ |
521 | | - { |
522 | | - "name": "get_python_environment_info", |
523 | | - "displayName": "%python.languageModelTools.get_python_environment_info.displayName%", |
524 | | - "userDescription": "%python.languageModelTools.get_python_environment_info.userDescription%", |
525 | | - "modelDescription": "This tool will retrieve the details of the Python Environment for the specified file or workspace. The details returned include the 1. Type of Environment (conda, venv, etec), 2. Version of Python, 3. List of all installed packages with their versions. ", |
526 | | - "toolReferenceName": "pythonEnvironmentDetails", |
527 | | - "tags": [ |
528 | | - "python", |
529 | | - "extension_installed_by_tool" |
530 | | - ], |
531 | | - "icon": "$(snake)", |
532 | | - "canBeReferencedInPrompt": true, |
533 | | - "inputSchema": { |
534 | | - "type": "object", |
535 | | - "properties": { |
536 | | - "resourcePath": { |
537 | | - "type": "string" |
538 | | - } |
539 | | - }, |
540 | | - "description": "The path to the Python file or workspace to get the environment information for.", |
541 | | - "required": [] |
542 | | - } |
543 | | - }, |
544 | | - { |
545 | | - "name": "get_python_executable_info", |
546 | | - "displayName": "%python.languageModelTools.get_python_executable.displayName%", |
547 | | - "userDescription": "%python.languageModelTools.get_python_executable.userDescription%", |
548 | | - "modelDescription": "This tool will retrieve the details of the Python Environment for the specified file or workspace. ALWAYS use this tool before executing any Python command in the terminal. This tool returns the details of how to construct the fully qualified path and or command including details such as arguments required to run Python in a terminal. Note: Instead of executing `python --version` or `python -c 'import sys; print(sys.executable)'`, use this tool to get the Python executable path to replace the `python` command. E.g. instead of using `python -c 'import sys; print(sys.executable)'`, use this tool to build the command `conda run -n <env_name> -c 'import sys; print(sys.executable)'`.", |
549 | | - "toolReferenceName": "pythonExecutableDetails", |
550 | | - "tags": [ |
551 | | - "python", |
552 | | - "extension_installed_by_tool" |
553 | | - ], |
554 | | - "icon": "$(files)", |
555 | | - "canBeReferencedInPrompt": true, |
556 | | - "inputSchema": { |
557 | | - "type": "object", |
558 | | - "properties": { |
559 | | - "resourcePath": { |
560 | | - "type": "string" |
561 | | - } |
562 | | - }, |
563 | | - "description": "The path to the Python file or workspace to get the executable information for. If not provided, the current workspace will be used. Where possible pass the path to the file or workspace.", |
564 | | - "required": [] |
565 | | - } |
566 | | - }, |
567 | | - { |
568 | | - "name": "install_python_package", |
569 | | - "displayName": "%python.languageModelTools.install_python_package.displayName%", |
570 | | - "userDescription": "%python.languageModelTools.install_python_package.userDescription%", |
571 | | - "modelDescription": "Installs Python packages in the given workspace. Use this tool to install packages in the user's chosen environment.", |
572 | | - "toolReferenceName": "installPythonPackage", |
573 | | - "tags": [ |
574 | | - "python", |
575 | | - "install python package", |
576 | | - "extension_installed_by_tool" |
577 | | - ], |
578 | | - "icon": "$(package)", |
579 | | - "canBeReferencedInPrompt": true, |
580 | | - "inputSchema": { |
581 | | - "type": "object", |
582 | | - "properties": { |
583 | | - "packageList": { |
584 | | - "type": "array", |
585 | | - "items": { |
586 | | - "type": "string" |
587 | | - }, |
588 | | - "description": "The list of packages to install." |
589 | | - }, |
590 | | - "resourcePath": { |
591 | | - "type": "string", |
592 | | - "description": "The path to the Python file or workspace into which the packages are installed. If not provided, the current workspace will be used. Where possible pass the path to the file or workspace." |
593 | | - } |
594 | | - }, |
595 | | - "required": [ |
596 | | - "packageList" |
597 | | - ] |
598 | | - } |
599 | | - }, |
600 | | - { |
601 | | - "name": "create_quick_virtual_environment", |
602 | | - "displayName": "Create a Virtual Environment", |
603 | | - "modelDescription": "This tool will create a Virual Environment", |
604 | | - "tags": [], |
605 | | - "canBeReferencedInPrompt": false, |
606 | | - "inputSchema": { |
607 | | - "type": "object", |
608 | | - "properties": { |
609 | | - "packageList": { |
610 | | - "type": "array", |
611 | | - "items": { |
612 | | - "type": "string" |
613 | | - }, |
614 | | - "description": "The list of packages to install." |
615 | | - }, |
616 | | - "resourcePath": { |
617 | | - "type": "string", |
618 | | - "description": "The path to the Python file or workspace for which a Python Environment needs to be configured." |
619 | | - } |
620 | | - }, |
621 | | - "required": [] |
622 | | - }, |
623 | | - "when": "false" |
624 | | - } |
625 | 515 | ] |
626 | 516 | }, |
627 | 517 | "scripts": { |
|
0 commit comments