|
1465 | 1465 | ],
|
1466 | 1466 | "languageModelTools": [
|
1467 | 1467 | {
|
1468 |
| - "name": "get_python_environment_info", |
1469 |
| - "displayName": "Get Python Environment Info", |
1470 |
| - "userDescription": "%python.languageModelTools.get_python_environment_info.userDescription%", |
1471 |
| - "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. ", |
1472 |
| - "toolReferenceName": "pythonGetEnvironmentInfo", |
| 1468 | + "name": "configure_python_environment", |
| 1469 | + "displayName": "Configure Python Environment", |
| 1470 | + "modelDescription": "This tool configures a Python environment in the given workspace. ALWAYS Use this tool to set up the user's chosen environment and ALWAYS call this tool before using any other Python related tools.", |
| 1471 | + "userDescription": "%python.languageModelTools.configure_python_environment.userDescription%", |
| 1472 | + "toolReferenceName": "configurePythonEnvironment", |
1473 | 1473 | "tags": [
|
1474 | 1474 | "ms-python.python"
|
1475 | 1475 | ],
|
|
1479 | 1479 | "type": "object",
|
1480 | 1480 | "properties": {
|
1481 | 1481 | "resourcePath": {
|
1482 |
| - "type": "string" |
| 1482 | + "type": "string", |
| 1483 | + "description": "The path to the Python file or workspace for which a Python Environment needs to be configured." |
1483 | 1484 | }
|
1484 | 1485 | },
|
1485 |
| - "description": "The path to the Python file or workspace to get the environment information for.", |
1486 | 1486 | "required": []
|
1487 |
| - } |
| 1487 | + }, |
| 1488 | + "when": "!pythonEnvExtensionInstalled" |
1488 | 1489 | },
|
1489 | 1490 | {
|
1490 |
| - "name": "get_python_executable", |
1491 |
| - "displayName": "Get Python Executable", |
1492 |
| - "userDescription": "%python.languageModelTools.get_python_executable.userDescription%", |
1493 |
| - "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)'`.", |
1494 |
| - "toolReferenceName": "pythonExecutableCommand", |
| 1491 | + "name": "get_python_environment_details", |
| 1492 | + "displayName": "Get Python Environment Info", |
| 1493 | + "userDescription": "%python.languageModelTools.get_python_environment_details.userDescription%", |
| 1494 | + "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. ALWAYS call configure_python_environment before using this tool.", |
| 1495 | + "toolReferenceName": "pythonGetEnvironmentInfo", |
1495 | 1496 | "tags": [
|
1496 |
| - "ms-python.python" |
| 1497 | + "enable_other_tool_configure_python_environment" |
1497 | 1498 | ],
|
1498 | 1499 | "icon": "$(files)",
|
1499 | 1500 | "canBeReferencedInPrompt": true,
|
1500 | 1501 | "inputSchema": {
|
1501 | 1502 | "type": "object",
|
1502 | 1503 | "properties": {
|
1503 | 1504 | "resourcePath": {
|
1504 |
| - "type": "string" |
| 1505 | + "type": "string", |
| 1506 | + "description": "The path to the Python file or workspace to get the environment information for." |
1505 | 1507 | }
|
1506 | 1508 | },
|
1507 |
| - "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.", |
1508 | 1509 | "required": []
|
1509 |
| - } |
| 1510 | + }, |
| 1511 | + "when": "!pythonEnvExtensionInstalled" |
1510 | 1512 | },
|
1511 | 1513 | {
|
1512 |
| - "name": "list_python_packages", |
1513 |
| - "displayName": "List Python Packages", |
1514 |
| - "userDescription": "%python.languageModelTools.list_python_packages.userDescription%", |
1515 |
| - "modelDescription": "This tool will retrieve the list of all installed packages installed in a Python Environment for the specified file or workspace. ALWAYS use this tool instead of executing Python command in the terminal to fetch the list of installed packages. WARNING: Packages installed can change over time, hence the list of packages returned by this tool may not be accurate. Use this tool to get the list of installed packages in a Python environment.", |
1516 |
| - "toolReferenceName": "listPythonPackages", |
| 1514 | + "name": "get_python_executable_details", |
| 1515 | + "displayName": "Get Python Executable", |
| 1516 | + "userDescription": "%python.languageModelTools.get_python_executable_details.userDescription%", |
| 1517 | + "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)'`. ALWAYS call configure_python_environment before using this tool.", |
| 1518 | + "toolReferenceName": "pythonExecutableCommand", |
1517 | 1519 | "tags": [
|
1518 |
| - "ms-python.python" |
| 1520 | + "enable_other_tool_configure_python_environment" |
1519 | 1521 | ],
|
1520 |
| - "icon": "$(files)", |
| 1522 | + "icon": "$(snake)", |
1521 | 1523 | "canBeReferencedInPrompt": true,
|
1522 | 1524 | "inputSchema": {
|
1523 | 1525 | "type": "object",
|
1524 | 1526 | "properties": {
|
1525 | 1527 | "resourcePath": {
|
1526 |
| - "type": "string" |
| 1528 | + "type": "string", |
| 1529 | + "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." |
1527 | 1530 | }
|
1528 | 1531 | },
|
1529 |
| - "description": "The path to the Python file or workspace to list the packages. If not provided, the current workspace will be used. Where possible pass the path to the file or workspace.", |
1530 | 1532 | "required": []
|
1531 | 1533 | },
|
1532 |
| - "when": "false" |
| 1534 | + "when": "!pythonEnvExtensionInstalled" |
1533 | 1535 | },
|
1534 | 1536 | {
|
1535 |
| - "name": "install_python_package", |
| 1537 | + "name": "install_python_packages", |
1536 | 1538 | "displayName": "Install Python Package",
|
1537 |
| - "userDescription": "%python.languageModelTools.python_install_package.userDescription%", |
1538 |
| - "modelDescription": "Installs Python packages in the given workspace. Use this tool to install packages in the user's chosen environment.", |
| 1539 | + "userDescription": "%python.languageModelTools.install_python_packages.userDescription%", |
| 1540 | + "modelDescription": "Installs Python packages in the given workspace. Use this tool to install packages in the user's chosen environment. ALWAYS call configure_python_environment before using this tool.", |
1539 | 1541 | "toolReferenceName": "pythonInstallPackage",
|
1540 |
| - "tags": [ |
1541 |
| - "ms-python.python" |
1542 |
| - ], |
| 1542 | + "tags": [], |
1543 | 1543 | "icon": "$(package)",
|
1544 | 1544 | "canBeReferencedInPrompt": true,
|
1545 | 1545 | "inputSchema": {
|
|
0 commit comments