From 61794747cec7cede37bc22907153b334003f37b4 Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Wed, 3 Dec 2025 10:10:14 -0800 Subject: [PATCH 01/13] initial --- package-lock.json | 325 +++++++++++++++--- package.json | 2 +- .../deployContainerApp/deployContainerApp.ts | 15 +- src/webviews/OpenConfirmationViewStep.ts | 3 +- src/webviews/OpenLoadingViewStep.ts | 10 +- 5 files changed, 297 insertions(+), 58 deletions(-) diff --git a/package-lock.json b/package-lock.json index d5f0977cd..d40f5ca6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,9 +21,9 @@ "@azure/storage-blob": "^12.4.1", "@fluentui/react-components": "^9.56.2", "@fluentui/react-icons": "^2.0.265", - "@microsoft/vscode-azext-azureutils": "^3.5.2", + "@microsoft/vscode-azext-azureutils": "file:../vscode-azuretools/azure/microsoft-vscode-azext-azureutils-4.0.0.tgz", "@microsoft/vscode-azext-github": "^1.0.7", - "@microsoft/vscode-azext-utils": "^3.5.1", + "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.2.tgz", "@microsoft/vscode-azureresources-api": "^2.6.3", "@vscode/codicons": "0.0.38", "buffer": "^6.0.3", @@ -2522,9 +2522,10 @@ } }, "node_modules/@microsoft/vscode-azext-azureutils": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-azureutils/-/vscode-azext-azureutils-3.5.2.tgz", - "integrity": "sha512-0jAkM2jAdrVq+lR5yNNQnL/O7Vp6yQo5l0oAyVcddp6WB2bUQrWUUZo1YeTaWl/23MMadWtFmhM4RRJPGWoYoQ==", + "version": "4.0.0", + "resolved": "file:../vscode-azuretools/azure/microsoft-vscode-azext-azureutils-4.0.0.tgz", + "integrity": "sha512-rn8zNcFOaeu8Nl0o/DgSwmInXUNFIgrfm1jzbRmfitPCeAKaVLfbaRSBC0RZDAttq/NWgzoz5k1hUiX9x7crqg==", + "license": "MIT", "dependencies": { "@azure/arm-authorization": "^9.0.0", "@azure/arm-authorization-profile-2020-09-01-hybrid": "^2.1.0", @@ -2537,23 +2538,27 @@ "@azure/core-client": "^1.6.0", "@azure/core-rest-pipeline": "^1.9.0", "@azure/logger": "^1.0.4", - "@microsoft/vscode-azext-utils": "^3.4.2", - "semver": "^7.3.7", - "uuid": "^9.0.0" + "@microsoft/vscode-azext-utils": "file:../utils/microsoft-vscode-azext-utils-4.0.2.tgz", + "@microsoft/vscode-azureresources-api": "^3.0.0", + "semver": "^7.3.7" + }, + "engines": { + "vscode": "^1.105.0" }, "peerDependencies": { "@azure/ms-rest-azure-env": "^2.0.0" } }, - "node_modules/@microsoft/vscode-azext-azureutils/node_modules/uuid": { - "version": "9.0.1", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], + "node_modules/@microsoft/vscode-azext-azureutils/node_modules/@microsoft/vscode-azureresources-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@microsoft/vscode-azureresources-api/-/vscode-azureresources-api-3.0.0.tgz", + "integrity": "sha512-IfivhAfLjUQtIJa3kqfZPJanb9m3XVBgRmYrFQtnRp6GWeKGKhkyMC44MunodtX0k4C7A1LmG3lM4z38sxCcpQ==", "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" + "engines": { + "vscode": "^1.105.0" + }, + "peerDependencies": { + "@azure/ms-rest-azure-env": "^2.0.0" } }, "node_modules/@microsoft/vscode-azext-dev": { @@ -2709,10 +2714,11 @@ "@octokit/rest": "^20.1.2" } }, - "node_modules/@microsoft/vscode-azext-utils": { + "node_modules/@microsoft/vscode-azext-github/node_modules/@microsoft/vscode-azext-utils": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-utils/-/vscode-azext-utils-3.5.1.tgz", "integrity": "sha512-+HGxhaPZrNg6eHUxMSVJSwxHV5q+DGnHdKYUneMkHVCG6JJYMf67S2ll6Uhvts1ItSBNOASUNy0MVm7nnIN98w==", + "license": "MIT", "dependencies": { "@microsoft/vscode-azureresources-api": "^2.6.2", "@vscode/extension-telemetry": "^0.9.6", @@ -2728,15 +2734,74 @@ "@azure/ms-rest-azure-env": "^2.0.0" } }, - "node_modules/@microsoft/vscode-azext-utils/node_modules/escape-string-regexp": { + "node_modules/@microsoft/vscode-azext-github/node_modules/@selderee/plugin-htmlparser2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.6.0.tgz", + "integrity": "sha512-J3jpy002TyBjd4N/p6s+s90eX42H2eRhK3SbsZuvTDv977/E8p2U3zikdiehyJja66do7FlxLomZLPlvl2/xaA==", + "license": "MIT", + "dependencies": { + "domhandler": "^4.2.0", + "selderee": "^0.6.0" + }, + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, + "node_modules/@microsoft/vscode-azext-github/node_modules/escape-string-regexp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/@microsoft/vscode-azext-utils/node_modules/uuid": { + "node_modules/@microsoft/vscode-azext-github/node_modules/html-to-text": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-8.2.1.tgz", + "integrity": "sha512-aN/3JvAk8qFsWVeE9InWAWueLXrbkoVZy0TkzaGhoRBC2gCFEeRLDDJN3/ijIGHohy6H+SZzUQWN/hcYtaPK8w==", + "license": "MIT", + "dependencies": { + "@selderee/plugin-htmlparser2": "^0.6.0", + "deepmerge": "^4.2.2", + "he": "^1.2.0", + "htmlparser2": "^6.1.0", + "minimist": "^1.2.6", + "selderee": "^0.6.0" + }, + "bin": { + "html-to-text": "bin/cli.js" + }, + "engines": { + "node": ">=10.23.2" + } + }, + "node_modules/@microsoft/vscode-azext-github/node_modules/parseley": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/parseley/-/parseley-0.7.0.tgz", + "integrity": "sha512-xyOytsdDu077M3/46Am+2cGXEKM9U9QclBDv7fimY7e+BBlxh2JcBp2mgNsmkyA9uvgyTjVzDi7cP1v4hcFxbw==", + "license": "MIT", + "dependencies": { + "moo": "^0.5.1", + "nearley": "^2.20.1" + }, + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, + "node_modules/@microsoft/vscode-azext-github/node_modules/selderee": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/selderee/-/selderee-0.6.0.tgz", + "integrity": "sha512-ibqWGV5aChDvfVdqNYuaJP/HnVBhlRGSRrlbttmlMpHcLuTqqbMH36QkSs9GEgj5M88JDYLI8eyP94JaQ8xRlg==", + "license": "MIT", + "dependencies": { + "parseley": "^0.7.0" + }, + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, + "node_modules/@microsoft/vscode-azext-github/node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", @@ -2744,10 +2809,53 @@ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } }, + "node_modules/@microsoft/vscode-azext-utils": { + "version": "4.0.2", + "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.2.tgz", + "integrity": "sha512-mPwGOyIdXyuAFnh3ih8aKkyNmbxPb/e8uctH6oCpmhb9sUbP4IixLGTffXAxWVXSyWRu1fF8NqqX+2JyIEE4mA==", + "license": "MIT", + "dependencies": { + "@microsoft/vscode-azureresources-api": "^3.0.0", + "@vscode/extension-telemetry": "^0.9.6", + "dayjs": "^1.11.2", + "escape-string-regexp": "^2.0.0", + "html-to-text": "^9.0.0", + "semver": "^7.3.7", + "vscode-tas-client": "^0.1.84" + }, + "engines": { + "vscode": "^1.105.0" + }, + "peerDependencies": { + "@azure/ms-rest-azure-env": "^2.0.0" + } + }, + "node_modules/@microsoft/vscode-azext-utils/node_modules/@microsoft/vscode-azureresources-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@microsoft/vscode-azureresources-api/-/vscode-azureresources-api-3.0.0.tgz", + "integrity": "sha512-IfivhAfLjUQtIJa3kqfZPJanb9m3XVBgRmYrFQtnRp6GWeKGKhkyMC44MunodtX0k4C7A1LmG3lM4z38sxCcpQ==", + "license": "MIT", + "engines": { + "vscode": "^1.105.0" + }, + "peerDependencies": { + "@azure/ms-rest-azure-env": "^2.0.0" + } + }, + "node_modules/@microsoft/vscode-azext-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/@microsoft/vscode-azureresources-api": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/@microsoft/vscode-azureresources-api/-/vscode-azureresources-api-2.6.3.tgz", @@ -3027,17 +3135,33 @@ "license": "MIT" }, "node_modules/@selderee/plugin-htmlparser2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.6.0.tgz", - "integrity": "sha512-J3jpy002TyBjd4N/p6s+s90eX42H2eRhK3SbsZuvTDv977/E8p2U3zikdiehyJja66do7FlxLomZLPlvl2/xaA==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.11.0.tgz", + "integrity": "sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==", + "license": "MIT", "dependencies": { - "domhandler": "^4.2.0", - "selderee": "^0.6.0" + "domhandler": "^5.0.3", + "selderee": "^0.11.0" }, "funding": { "url": "https://ko-fi.com/killymxi" } }, + "node_modules/@selderee/plugin-htmlparser2/node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, "node_modules/@sindresorhus/merge-streams": { "version": "2.3.0", "dev": true, @@ -5667,6 +5791,7 @@ "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -5874,7 +5999,8 @@ "node_modules/discontinuous-range": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", - "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==" + "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==", + "license": "MIT" }, "node_modules/dns-packet": { "version": "5.6.1", @@ -5919,7 +6045,9 @@ } }, "node_modules/domelementtype": { - "version": "2.2.0", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "funding": [ { "type": "github", @@ -7505,22 +7633,93 @@ } }, "node_modules/html-to-text": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-8.2.1.tgz", - "integrity": "sha512-aN/3JvAk8qFsWVeE9InWAWueLXrbkoVZy0TkzaGhoRBC2gCFEeRLDDJN3/ijIGHohy6H+SZzUQWN/hcYtaPK8w==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-9.0.5.tgz", + "integrity": "sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg==", + "license": "MIT", "dependencies": { - "@selderee/plugin-htmlparser2": "^0.6.0", - "deepmerge": "^4.2.2", - "he": "^1.2.0", - "htmlparser2": "^6.1.0", - "minimist": "^1.2.6", - "selderee": "^0.6.0" + "@selderee/plugin-htmlparser2": "^0.11.0", + "deepmerge": "^4.3.1", + "dom-serializer": "^2.0.0", + "htmlparser2": "^8.0.2", + "selderee": "^0.11.0" }, - "bin": { - "html-to-text": "bin/cli.js" + "engines": { + "node": ">=14" + } + }, + "node_modules/html-to-text/node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/html-to-text/node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.3.0" }, "engines": { - "node": ">=10.23.2" + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/html-to-text/node_modules/domutils": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/html-to-text/node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/html-to-text/node_modules/htmlparser2": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" } }, "node_modules/htmlparser2": { @@ -8423,6 +8622,15 @@ "shell-quote": "^1.8.1" } }, + "node_modules/leac": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/leac/-/leac-0.6.0.tgz", + "integrity": "sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==", + "license": "MIT", + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, "node_modules/lead": { "version": "4.0.0", "dev": true, @@ -9052,7 +9260,8 @@ "node_modules/moo": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", - "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==" + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==", + "license": "BSD-3-Clause" }, "node_modules/ms": { "version": "2.1.3", @@ -9105,6 +9314,7 @@ "version": "2.20.1", "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", + "license": "MIT", "dependencies": { "commander": "^2.19.0", "moo": "^0.5.0", @@ -9125,7 +9335,8 @@ "node_modules/nearley/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" }, "node_modules/negotiator": { "version": "0.6.4", @@ -9543,12 +9754,13 @@ } }, "node_modules/parseley": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/parseley/-/parseley-0.7.0.tgz", - "integrity": "sha512-xyOytsdDu077M3/46Am+2cGXEKM9U9QclBDv7fimY7e+BBlxh2JcBp2mgNsmkyA9uvgyTjVzDi7cP1v4hcFxbw==", + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/parseley/-/parseley-0.12.1.tgz", + "integrity": "sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==", + "license": "MIT", "dependencies": { - "moo": "^0.5.1", - "nearley": "^2.20.1" + "leac": "^0.6.0", + "peberminta": "^0.9.0" }, "funding": { "url": "https://ko-fi.com/killymxi" @@ -9633,6 +9845,15 @@ "node": ">=8" } }, + "node_modules/peberminta": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/peberminta/-/peberminta-0.9.0.tgz", + "integrity": "sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ==", + "license": "MIT", + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, "node_modules/pend": { "version": "1.2.0", "dev": true, @@ -10013,12 +10234,14 @@ "node_modules/railroad-diagrams": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", - "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==" + "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==", + "license": "CC0-1.0" }, "node_modules/randexp": { "version": "0.4.6", "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", + "license": "MIT", "dependencies": { "discontinuous-range": "1.0.0", "ret": "~0.1.10" @@ -10318,6 +10541,7 @@ "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "license": "MIT", "engines": { "node": ">=0.12" } @@ -10537,11 +10761,12 @@ } }, "node_modules/selderee": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/selderee/-/selderee-0.6.0.tgz", - "integrity": "sha512-ibqWGV5aChDvfVdqNYuaJP/HnVBhlRGSRrlbttmlMpHcLuTqqbMH36QkSs9GEgj5M88JDYLI8eyP94JaQ8xRlg==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/selderee/-/selderee-0.11.0.tgz", + "integrity": "sha512-5TF+l7p4+OsnP8BCCvSyZiSPc4x4//p5uPwK8TCnVPJYRmU2aYKMpOXvw8zM5a5JvuuCGN1jmsMwuU2W02ukfA==", + "license": "MIT", "dependencies": { - "parseley": "^0.7.0" + "parseley": "^0.12.0" }, "funding": { "url": "https://ko-fi.com/killymxi" diff --git a/package.json b/package.json index d34e65e7f..d3cbecb44 100644 --- a/package.json +++ b/package.json @@ -874,7 +874,7 @@ "@fluentui/react-icons": "^2.0.265", "@microsoft/vscode-azext-azureutils": "^3.5.2", "@microsoft/vscode-azext-github": "^1.0.7", - "@microsoft/vscode-azext-utils": "^3.5.1", + "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.2.tgz", "@microsoft/vscode-azureresources-api": "^2.6.3", "@vscode/codicons": "0.0.38", "buffer": "^6.0.3", diff --git a/src/commands/deployContainerApp/deployContainerApp.ts b/src/commands/deployContainerApp/deployContainerApp.ts index 7e0b6568a..6b2fd0a20 100644 --- a/src/commands/deployContainerApp/deployContainerApp.ts +++ b/src/commands/deployContainerApp/deployContainerApp.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { KnownActiveRevisionsMode } from "@azure/arm-appcontainers"; -import { AzureWizard, CopilotUserInput, createSubscriptionContext, nonNullProp, type AzureWizardPromptStep, type IActionContext, type ISubscriptionActionContext, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; +import { AzureWizard, createSubscriptionContext, nonNullProp, type AzureWizardPromptStep, type IActionContext, type ISubscriptionActionContext, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; import { ImageSource } from "../../constants"; import { type ContainerAppItem } from "../../tree/ContainerAppItem"; import { createActivityContext } from "../../utils/activityUtils"; @@ -14,7 +14,7 @@ import { getVerifyProvidersStep } from "../../utils/getVerifyProvidersStep"; import { localize } from "../../utils/localize"; import { pickContainerApp } from "../../utils/pickItem/pickContainerApp"; import { OpenConfirmationViewStep } from "../../webviews/OpenConfirmationViewStep"; -import { OpenLoadingViewStep } from "../../webviews/OpenLoadingViewStep"; +import { openLoadingViewPanel } from "../../webviews/OpenLoadingViewStep"; import { CommandAttributes } from "../CommandAttributes"; import { ContainerAppOverwriteConfirmStep } from "../ContainerAppOverwriteConfirmStep"; import { deployWorkspaceProject } from "../deployWorkspaceProject/deployWorkspaceProject"; @@ -28,6 +28,10 @@ import { ContainerAppDeployStartingResourcesLogStep } from "./ContainerAppDeploy const deployContainerAppCommandName: string = localize('deployContainerApp', 'Deploy to Container App...'); export async function deployContainerApp(context: IActionContext, node?: ContainerAppItem): Promise { + if (isCopilotUserInput(context)) { + await openLoadingViewPanel(context); + } + const item: ContainerAppItem = node ?? await pickContainerApp(context); const subscriptionContext: ISubscriptionContext = createSubscriptionContext(item.subscription); const subscriptionActionContext: ISubscriptionActionContext = { ...context, ...subscriptionContext }; @@ -66,8 +70,7 @@ export async function deployContainerApp(context: IActionContext, node?: Contain let title: string = localize('deployContainerAppTitle', 'Deploy image to container app'); const promptSteps: AzureWizardPromptStep[] = [] - if (wizardContext.ui instanceof CopilotUserInput) { - promptSteps.push(new OpenLoadingViewStep()); + if (isCopilotUserInput(wizardContext)) { confirmationViewDescription = localize('viewDescription', 'Please review AI generated inputs and select any you would like to modify. Note: Any input proceeding the modified input will need to change as well'); confirmationViewTabTitle = localize('deployContainerAppTabTitle', 'Summary - Deploy Image to Container App using Copilot'); title = localize('deployContainerAppWithCopilotTitle', 'Deploy image to container app using copilot'); @@ -105,3 +108,7 @@ async function promptImageSource(context: ISubscriptionActionContext): Promise extends AzureWizardPromptStep { diff --git a/src/webviews/OpenLoadingViewStep.ts b/src/webviews/OpenLoadingViewStep.ts index c706e5965..961f5458c 100644 --- a/src/webviews/OpenLoadingViewStep.ts +++ b/src/webviews/OpenLoadingViewStep.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { AzureWizardPromptStep, runPromptStep, type IActionContext } from "@microsoft/vscode-azext-utils"; import * as vscode from 'vscode'; import { localize } from "../utils/localize"; import { LoadingViewController } from "./LoadingViewController"; @@ -20,3 +20,11 @@ export class OpenLoadingViewStep extends AzureWizardPr return true; } } + +export async function openLoadingViewPanel(context: IActionContext): Promise { + const promptSteps: AzureWizardPromptStep[] = [new OpenLoadingViewStep()]; + + return await runPromptStep(context, { + promptSteps + }); +} From 6369e45307835e4d2f222fae215c34a12fc26c7a Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Wed, 10 Dec 2025 14:46:13 -0800 Subject: [PATCH 02/13] fix prompt step issues --- package-lock.json | 119 +++++++++++++++--- .../ContainerAppListStep.ts | 12 +- .../ManagedEnvironmentListStep.ts | 10 +- .../deployContainerApp/deployContainerApp.ts | 65 +++++++--- .../ContainerAppStartVerificationStep.ts | 2 +- src/commands/registerCommands.ts | 3 +- ...nagedIdentityRegistryCredentialsContext.ts | 4 +- src/webviews/OpenLoadingViewStep.ts | 4 +- 8 files changed, 175 insertions(+), 44 deletions(-) diff --git a/package-lock.json b/package-lock.json index d40f5ca6f..d76c09ffd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "@azure/storage-blob": "^12.4.1", "@fluentui/react-components": "^9.56.2", "@fluentui/react-icons": "^2.0.265", - "@microsoft/vscode-azext-azureutils": "file:../vscode-azuretools/azure/microsoft-vscode-azext-azureutils-4.0.0.tgz", + "@microsoft/vscode-azext-azureutils": "^3.5.2", "@microsoft/vscode-azext-github": "^1.0.7", "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.2.tgz", "@microsoft/vscode-azureresources-api": "^2.6.3", @@ -2522,9 +2522,9 @@ } }, "node_modules/@microsoft/vscode-azext-azureutils": { - "version": "4.0.0", - "resolved": "file:../vscode-azuretools/azure/microsoft-vscode-azext-azureutils-4.0.0.tgz", - "integrity": "sha512-rn8zNcFOaeu8Nl0o/DgSwmInXUNFIgrfm1jzbRmfitPCeAKaVLfbaRSBC0RZDAttq/NWgzoz5k1hUiX9x7crqg==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-azureutils/-/vscode-azext-azureutils-3.5.2.tgz", + "integrity": "sha512-0jAkM2jAdrVq+lR5yNNQnL/O7Vp6yQo5l0oAyVcddp6WB2bUQrWUUZo1YeTaWl/23MMadWtFmhM4RRJPGWoYoQ==", "license": "MIT", "dependencies": { "@azure/arm-authorization": "^9.0.0", @@ -2538,29 +2538,114 @@ "@azure/core-client": "^1.6.0", "@azure/core-rest-pipeline": "^1.9.0", "@azure/logger": "^1.0.4", - "@microsoft/vscode-azext-utils": "file:../utils/microsoft-vscode-azext-utils-4.0.2.tgz", - "@microsoft/vscode-azureresources-api": "^3.0.0", - "semver": "^7.3.7" - }, - "engines": { - "vscode": "^1.105.0" + "@microsoft/vscode-azext-utils": "^3.4.2", + "semver": "^7.3.7", + "uuid": "^9.0.0" }, "peerDependencies": { "@azure/ms-rest-azure-env": "^2.0.0" } }, - "node_modules/@microsoft/vscode-azext-azureutils/node_modules/@microsoft/vscode-azureresources-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@microsoft/vscode-azureresources-api/-/vscode-azureresources-api-3.0.0.tgz", - "integrity": "sha512-IfivhAfLjUQtIJa3kqfZPJanb9m3XVBgRmYrFQtnRp6GWeKGKhkyMC44MunodtX0k4C7A1LmG3lM4z38sxCcpQ==", + "node_modules/@microsoft/vscode-azext-azureutils/node_modules/@microsoft/vscode-azext-utils": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-utils/-/vscode-azext-utils-3.5.1.tgz", + "integrity": "sha512-+HGxhaPZrNg6eHUxMSVJSwxHV5q+DGnHdKYUneMkHVCG6JJYMf67S2ll6Uhvts1ItSBNOASUNy0MVm7nnIN98w==", "license": "MIT", - "engines": { - "vscode": "^1.105.0" + "dependencies": { + "@microsoft/vscode-azureresources-api": "^2.6.2", + "@vscode/extension-telemetry": "^0.9.6", + "dayjs": "^1.11.2", + "escape-string-regexp": "^2.0.0", + "html-to-text": "^8.2.0", + "semver": "^7.3.7", + "uuid": "^9.0.0", + "vscode-tas-client": "^0.1.84", + "vscode-uri": "^3.0.6" }, "peerDependencies": { "@azure/ms-rest-azure-env": "^2.0.0" } }, + "node_modules/@microsoft/vscode-azext-azureutils/node_modules/@selderee/plugin-htmlparser2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.6.0.tgz", + "integrity": "sha512-J3jpy002TyBjd4N/p6s+s90eX42H2eRhK3SbsZuvTDv977/E8p2U3zikdiehyJja66do7FlxLomZLPlvl2/xaA==", + "license": "MIT", + "dependencies": { + "domhandler": "^4.2.0", + "selderee": "^0.6.0" + }, + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, + "node_modules/@microsoft/vscode-azext-azureutils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@microsoft/vscode-azext-azureutils/node_modules/html-to-text": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-8.2.1.tgz", + "integrity": "sha512-aN/3JvAk8qFsWVeE9InWAWueLXrbkoVZy0TkzaGhoRBC2gCFEeRLDDJN3/ijIGHohy6H+SZzUQWN/hcYtaPK8w==", + "license": "MIT", + "dependencies": { + "@selderee/plugin-htmlparser2": "^0.6.0", + "deepmerge": "^4.2.2", + "he": "^1.2.0", + "htmlparser2": "^6.1.0", + "minimist": "^1.2.6", + "selderee": "^0.6.0" + }, + "bin": { + "html-to-text": "bin/cli.js" + }, + "engines": { + "node": ">=10.23.2" + } + }, + "node_modules/@microsoft/vscode-azext-azureutils/node_modules/parseley": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/parseley/-/parseley-0.7.0.tgz", + "integrity": "sha512-xyOytsdDu077M3/46Am+2cGXEKM9U9QclBDv7fimY7e+BBlxh2JcBp2mgNsmkyA9uvgyTjVzDi7cP1v4hcFxbw==", + "license": "MIT", + "dependencies": { + "moo": "^0.5.1", + "nearley": "^2.20.1" + }, + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, + "node_modules/@microsoft/vscode-azext-azureutils/node_modules/selderee": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/selderee/-/selderee-0.6.0.tgz", + "integrity": "sha512-ibqWGV5aChDvfVdqNYuaJP/HnVBhlRGSRrlbttmlMpHcLuTqqbMH36QkSs9GEgj5M88JDYLI8eyP94JaQ8xRlg==", + "license": "MIT", + "dependencies": { + "parseley": "^0.7.0" + }, + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, + "node_modules/@microsoft/vscode-azext-azureutils/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@microsoft/vscode-azext-dev": { "version": "2.1.0", "dev": true, @@ -2817,7 +2902,7 @@ "node_modules/@microsoft/vscode-azext-utils": { "version": "4.0.2", "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.2.tgz", - "integrity": "sha512-mPwGOyIdXyuAFnh3ih8aKkyNmbxPb/e8uctH6oCpmhb9sUbP4IixLGTffXAxWVXSyWRu1fF8NqqX+2JyIEE4mA==", + "integrity": "sha512-5r7QaInfYnjc6OZDmOvFnQFee0t3cpqWs2JWGLdhsuy0K/7PT66EUZB8z10u9lpf8x1SyVGDUx894Rl1mK+qVQ==", "license": "MIT", "dependencies": { "@microsoft/vscode-azureresources-api": "^3.0.0", diff --git a/src/commands/createContainerApp/ContainerAppListStep.ts b/src/commands/createContainerApp/ContainerAppListStep.ts index af0ff68cd..7f8eb7adb 100644 --- a/src/commands/createContainerApp/ContainerAppListStep.ts +++ b/src/commands/createContainerApp/ContainerAppListStep.ts @@ -5,7 +5,7 @@ import { type ContainerApp, type ContainerAppsAPIClient } from "@azure/arm-appcontainers"; import { LocationListStep, parseAzureResourceId, ResourceGroupListStep, uiUtils } from "@microsoft/vscode-azext-azureutils"; -import { AzureWizardPromptStep, nonNullProp, type AzureWizardExecuteStep, type IAzureQuickPickItem, type IWizardOptions } from "@microsoft/vscode-azext-utils"; +import { AzureWizardPromptStep, nonNullProp, nonNullValueAndProp, type AzureWizardExecuteStep, type ConfirmationViewProperty, type IAzureQuickPickItem, type IWizardOptions } from "@microsoft/vscode-azext-utils"; import { containerAppProvider, containerAppResourceType } from "../../constants"; import { ContainerAppItem } from "../../tree/ContainerAppItem"; import { createContainerAppsAPIClient } from "../../utils/azureClients"; @@ -59,6 +59,14 @@ export class ContainerAppListStep extends A return !context.containerApp && !context.newContainerAppName; } + public confirmationViewProperty(context: T): ConfirmationViewProperty { + return { + name: localize('containerApp', 'Container App'), + value: nonNullValueAndProp(context.containerApp, 'name'), + contextPropertyName: 'containerApp', + } + } + private async getPicks(context: T): Promise[]> { const client: ContainerAppsAPIClient = await createContainerAppsAPIClient(context); @@ -72,7 +80,7 @@ export class ContainerAppListStep extends A } if (context.managedEnvironment) { - containerApps = containerApps.filter(ca => ca.managedEnvironmentId === context.managedEnvironment.id); + containerApps = containerApps.filter(ca => ca.managedEnvironmentId === context.managedEnvironment?.id); } return containerApps.map(ca => { diff --git a/src/commands/createManagedEnvironment/ManagedEnvironmentListStep.ts b/src/commands/createManagedEnvironment/ManagedEnvironmentListStep.ts index 5377b32e9..998d7c2f4 100644 --- a/src/commands/createManagedEnvironment/ManagedEnvironmentListStep.ts +++ b/src/commands/createManagedEnvironment/ManagedEnvironmentListStep.ts @@ -7,7 +7,7 @@ import { type ContainerAppsAPIClient, type ManagedEnvironment } from "@azure/arm import { type Workspace } from "@azure/arm-operationalinsights"; import { type ResourceGroup } from "@azure/arm-resources"; import { getResourceGroupFromId, LocationListStep, ResourceGroupListStep, uiUtils } from "@microsoft/vscode-azext-azureutils"; -import { AzureWizardPromptStep, nonNullProp, type AzureWizardExecuteStep, type IAzureQuickPickItem, type ISubscriptionActionContext, type IWizardOptions } from "@microsoft/vscode-azext-utils"; +import { AzureWizardPromptStep, nonNullProp, nonNullValueAndProp, type AzureWizardExecuteStep, type ConfirmationViewProperty, type IAzureQuickPickItem, type ISubscriptionActionContext, type IWizardOptions } from "@microsoft/vscode-azext-utils"; import { logAnalyticsProvider, logAnalyticsResourceType, managedEnvironmentProvider, managedEnvironmentResourceType } from "../../constants"; import { createContainerAppsAPIClient } from "../../utils/azureClients"; import { localize } from "../../utils/localize"; @@ -57,6 +57,14 @@ export class ManagedEnvironmentListStep { const client: ContainerAppsAPIClient = await createContainerAppsAPIClient(context); diff --git a/src/commands/deployContainerApp/deployContainerApp.ts b/src/commands/deployContainerApp/deployContainerApp.ts index 6b2fd0a20..cd6786e67 100644 --- a/src/commands/deployContainerApp/deployContainerApp.ts +++ b/src/commands/deployContainerApp/deployContainerApp.ts @@ -5,6 +5,7 @@ import { KnownActiveRevisionsMode } from "@azure/arm-appcontainers"; import { AzureWizard, createSubscriptionContext, nonNullProp, type AzureWizardPromptStep, type IActionContext, type ISubscriptionActionContext, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; +import { type AzureSubscription } from "@microsoft/vscode-azureresources-api"; import { ImageSource } from "../../constants"; import { type ContainerAppItem } from "../../tree/ContainerAppItem"; import { createActivityContext } from "../../utils/activityUtils"; @@ -17,6 +18,8 @@ import { OpenConfirmationViewStep } from "../../webviews/OpenConfirmationViewSte import { openLoadingViewPanel } from "../../webviews/OpenLoadingViewStep"; import { CommandAttributes } from "../CommandAttributes"; import { ContainerAppOverwriteConfirmStep } from "../ContainerAppOverwriteConfirmStep"; +import { ContainerAppListStep } from "../createContainerApp/ContainerAppListStep"; +import { ManagedEnvironmentListStep } from "../createManagedEnvironment/ManagedEnvironmentListStep"; import { deployWorkspaceProject } from "../deployWorkspaceProject/deployWorkspaceProject"; import { type DeployWorkspaceProjectResults } from "../deployWorkspaceProject/getDeployWorkspaceProjectResults"; import { editContainerCommandName } from "../editContainer/editContainer"; @@ -28,10 +31,6 @@ import { ContainerAppDeployStartingResourcesLogStep } from "./ContainerAppDeploy const deployContainerAppCommandName: string = localize('deployContainerApp', 'Deploy to Container App...'); export async function deployContainerApp(context: IActionContext, node?: ContainerAppItem): Promise { - if (isCopilotUserInput(context)) { - await openLoadingViewPanel(context); - } - const item: ContainerAppItem = node ?? await pickContainerApp(context); const subscriptionContext: ISubscriptionContext = createSubscriptionContext(item.subscription); const subscriptionActionContext: ISubscriptionActionContext = { ...context, ...subscriptionContext }; @@ -49,27 +48,57 @@ export async function deployContainerApp(context: IActionContext, node?: Contain return await deployWorkspaceProject(context, item); } - const wizardContext: ContainerAppDeployContext = { - ...subscriptionActionContext, - ...await createActivityContext({ withChildren: true }), - subscription: item.subscription, - containerApp: item.containerApp, - managedEnvironment: await getManagedEnvironmentFromContainerApp(subscriptionActionContext, item.containerApp), - imageSource, - activityAttributes: CommandAttributes.DeployContainerAppContainerRegistry, - }; - - if (isAzdExtensionInstalled()) { - wizardContext.telemetry.properties.isAzdExtensionInstalled = 'true'; + return await deployContainerAppInternal(subscriptionActionContext, item, imageSource); +} + +export async function deployContainerAppInternal(context: ISubscriptionActionContext, node?: ContainerAppItem, imageSource?: ImageSource, subscription?: AzureSubscription): Promise { + if (isCopilotUserInput(context)) { + await openLoadingViewPanel(context); + } + + const promptSteps: AzureWizardPromptStep[] = []; + + if (!node) { + promptSteps.push(new ManagedEnvironmentListStep(), new ContainerAppListStep()); + } + + let wizardContext: ContainerAppDeployContext = {} as ContainerAppDeployContext; + + if (context.subscriptionId && node && imageSource) { + // If this command gets re run we only want the internal portion of the command to run, so we set the callbackid + context.callbackId = 'containerApps.deployContainerAppInternal'; + wizardContext = { + ...context, + ...await createActivityContext({ withChildren: true }), + subscription: node.subscription, + containerApp: node.containerApp, + managedEnvironment: await getManagedEnvironmentFromContainerApp(context, node.containerApp), + imageSource, + activityAttributes: { + ...CommandAttributes.DeployContainerAppContainerRegistry, + subscription: node.subscription, + }, + }; + + if (isAzdExtensionInstalled()) { + wizardContext.telemetry.properties.isAzdExtensionInstalled = 'true'; + } + wizardContext.telemetry.properties.revisionMode = node.containerApp.revisionsMode; + } else if (context.subscriptionId && subscription) { + wizardContext = { + ...context, + ...await createActivityContext({ withChildren: true }), + subscription: subscription, + //at the moment we are only supporting re run with container registry image source + imageSource: ImageSource.ContainerRegistry + } } - wizardContext.telemetry.properties.revisionMode = item.containerApp.revisionsMode; const confirmationViewTitle: string = localize('summary', 'Summary'); let confirmationViewDescription: string = localize('viewDescription', 'Please select an input you would like to change. Note: Any input proceeding the changed input will need to change as well'); let confirmationViewTabTitle: string = localize('deployContainerAppTabTitle', 'Summary - Deploy Image to Container App'); let title: string = localize('deployContainerAppTitle', 'Deploy image to container app'); - const promptSteps: AzureWizardPromptStep[] = [] if (isCopilotUserInput(wizardContext)) { confirmationViewDescription = localize('viewDescription', 'Please review AI generated inputs and select any you would like to modify. Note: Any input proceeding the modified input will need to change as well'); confirmationViewTabTitle = localize('deployContainerAppTabTitle', 'Summary - Deploy Image to Container App using Copilot'); diff --git a/src/commands/image/imageSource/ContainerAppStartVerificationStep.ts b/src/commands/image/imageSource/ContainerAppStartVerificationStep.ts index 3ceffe89f..844a1165d 100644 --- a/src/commands/image/imageSource/ContainerAppStartVerificationStep.ts +++ b/src/commands/image/imageSource/ContainerAppStartVerificationStep.ts @@ -153,7 +153,7 @@ export class ContainerAppStartVerificationStep extends AzureWizardPr export async function openLoadingViewPanel(context: IActionContext): Promise { const promptSteps: AzureWizardPromptStep[] = [new OpenLoadingViewStep()]; - return await runPromptStep(context, { + return await runGenericPromptStep(context, { promptSteps }); } From a73ff7ee650e044c2a69f8f57b08ee0f718600d9 Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Wed, 10 Dec 2025 14:53:36 -0800 Subject: [PATCH 03/13] small change --- src/commands/deployContainerApp/deployContainerApp.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/deployContainerApp/deployContainerApp.ts b/src/commands/deployContainerApp/deployContainerApp.ts index cd6786e67..42c6b6b58 100644 --- a/src/commands/deployContainerApp/deployContainerApp.ts +++ b/src/commands/deployContainerApp/deployContainerApp.ts @@ -64,7 +64,7 @@ export async function deployContainerAppInternal(context: ISubscriptionActionCon let wizardContext: ContainerAppDeployContext = {} as ContainerAppDeployContext; - if (context.subscriptionId && node && imageSource) { + if (node && imageSource) { // If this command gets re run we only want the internal portion of the command to run, so we set the callbackid context.callbackId = 'containerApps.deployContainerAppInternal'; wizardContext = { @@ -84,7 +84,7 @@ export async function deployContainerAppInternal(context: ISubscriptionActionCon wizardContext.telemetry.properties.isAzdExtensionInstalled = 'true'; } wizardContext.telemetry.properties.revisionMode = node.containerApp.revisionsMode; - } else if (context.subscriptionId && subscription) { + } else if (subscription) { wizardContext = { ...context, ...await createActivityContext({ withChildren: true }), From 31244831e8a45dc9b5828be5369b6afc0d89db54 Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Tue, 10 Feb 2026 14:58:42 -0800 Subject: [PATCH 04/13] requested changes --- .../ManagedEnvironmentListStep.ts | 4 ++-- src/commands/deployContainerApp/deployContainerApp.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/commands/createManagedEnvironment/ManagedEnvironmentListStep.ts b/src/commands/createManagedEnvironment/ManagedEnvironmentListStep.ts index 998d7c2f4..61e5528d0 100644 --- a/src/commands/createManagedEnvironment/ManagedEnvironmentListStep.ts +++ b/src/commands/createManagedEnvironment/ManagedEnvironmentListStep.ts @@ -59,10 +59,10 @@ export class ManagedEnvironmentListStep { diff --git a/src/commands/deployContainerApp/deployContainerApp.ts b/src/commands/deployContainerApp/deployContainerApp.ts index 8856ed086..cd2bb8c49 100644 --- a/src/commands/deployContainerApp/deployContainerApp.ts +++ b/src/commands/deployContainerApp/deployContainerApp.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { KnownActiveRevisionsMode } from "@azure/arm-appcontainers"; -import { AzureWizard, createSubscriptionContext, nonNullProp, type AzureWizardPromptStep, type IActionContext, type ISubscriptionActionContext, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; +import { AzureWizard, CopilotUserInput, createSubscriptionContext, nonNullProp, type AzureWizardPromptStep, type IActionContext, type ISubscriptionActionContext, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; import { type AzureSubscription } from "@microsoft/vscode-azureresources-api"; import { ImageSource } from "../../constants"; import { type ContainerAppItem } from "../../tree/ContainerAppItem"; @@ -95,12 +95,12 @@ export async function deployContainerAppInternal(context: ISubscriptionActionCon } const confirmationViewTitle: string = localize('summary', 'Summary'); - let confirmationViewDescription: string = localize('viewDescription', 'Please select an input you would like to change. Note: Any input proceeding the changed input will need to change as well'); + let confirmationViewDescription: string = localize('viewDescription', 'Please select an input you would like to change. Note: Any input preceding the changed input will need to change as well'); let confirmationViewTabTitle: string = localize('deployContainerAppTabTitle', 'Summary - Deploy Image to Container App'); let title: string = localize('deployContainerAppTitle', 'Deploy image to container app'); if (isCopilotUserInput(wizardContext)) { - confirmationViewDescription = localize('viewDescription', 'Please review AI generated inputs and select any you would like to modify. Note: Any input proceeding the modified input will need to change as well'); + confirmationViewDescription = localize('viewDescription', 'Please review AI generated inputs and select any you would like to modify. Note: Any input preceding the modified input will need to change as well'); confirmationViewTabTitle = localize('deployContainerAppTabTitle', 'Summary - Deploy Image to Container App using Copilot'); title = localize('deployContainerAppWithCopilotTitle', 'Deploy image to container app using copilot'); } @@ -139,5 +139,5 @@ async function promptImageSource(context: ISubscriptionActionContext): Promise Date: Thu, 19 Feb 2026 09:19:39 -0800 Subject: [PATCH 05/13] small changes --- package-lock.json | 173 ++++++++++++++++-- package.json | 2 +- src/commands/copilot/deployWithCopilot.ts | 2 + .../deployContainerApp/deployContainerApp.ts | 32 ++-- src/utils/copilotUtils.ts | 20 ++ src/webviews/OpenConfirmationViewStep.ts | 5 +- 6 files changed, 207 insertions(+), 27 deletions(-) create mode 100644 src/utils/copilotUtils.ts diff --git a/package-lock.json b/package-lock.json index 3bda462fd..086735440 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "@fluentui/react-icons": "^2.0.265", "@microsoft/vscode-azext-azureutils": "^3.5.2", "@microsoft/vscode-azext-github": "^1.0.7", - "@microsoft/vscode-azext-utils": "^4.0.2", + "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.4.tgz", "@microsoft/vscode-azureresources-api": "^2.6.3", "@vscode/codicons": "0.0.38", "dayjs": "^1.11.3", @@ -2879,6 +2879,133 @@ "@swc/helpers": "^0.5.1" } }, + "node_modules/@github/copilot": { + "version": "0.0.394", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-0.0.394.tgz", + "integrity": "sha512-koSiaHvVwjgppgh+puxf6dgsR8ql/WST1scS5bjzMsJFfWk7f4xtEXla7TCQfSGoZkCmCsr2Tis27v5TpssiCg==", + "license": "SEE LICENSE IN LICENSE.md", + "bin": { + "copilot": "npm-loader.js" + }, + "optionalDependencies": { + "@github/copilot-darwin-arm64": "0.0.394", + "@github/copilot-darwin-x64": "0.0.394", + "@github/copilot-linux-arm64": "0.0.394", + "@github/copilot-linux-x64": "0.0.394", + "@github/copilot-win32-arm64": "0.0.394", + "@github/copilot-win32-x64": "0.0.394" + } + }, + "node_modules/@github/copilot-darwin-arm64": { + "version": "0.0.394", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-0.0.394.tgz", + "integrity": "sha512-qDmDFiFaYFW45UhxylN2JyQRLVGLCpkr5UmgbfH5e0aksf+69qytK/MwpD2Cq12KdTjyGMEorlADkSu5eftELA==", + "cpu": [ + "arm64" + ], + "license": "SEE LICENSE IN LICENSE.md", + "optional": true, + "os": [ + "darwin" + ], + "bin": { + "copilot-darwin-arm64": "copilot" + } + }, + "node_modules/@github/copilot-darwin-x64": { + "version": "0.0.394", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-0.0.394.tgz", + "integrity": "sha512-iN4YwSVFxhASiBjLk46f+AzRTNHCvYcmyTKBASxieMIhnDxznYmpo+haFKPCv2lCsEWU8s5LARCnXxxx8J1wKA==", + "cpu": [ + "x64" + ], + "license": "SEE LICENSE IN LICENSE.md", + "optional": true, + "os": [ + "darwin" + ], + "bin": { + "copilot-darwin-x64": "copilot" + } + }, + "node_modules/@github/copilot-linux-arm64": { + "version": "0.0.394", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-0.0.394.tgz", + "integrity": "sha512-9NeGvmO2tGztuneXZfYAyW3fDk6Pdl6Ffg8MAUaevA/p0awvA+ti/Vh0ZSTcI81nDTjkzONvrcIcjYAN7x0oSg==", + "cpu": [ + "arm64" + ], + "license": "SEE LICENSE IN LICENSE.md", + "optional": true, + "os": [ + "linux" + ], + "bin": { + "copilot-linux-arm64": "copilot" + } + }, + "node_modules/@github/copilot-linux-x64": { + "version": "0.0.394", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-0.0.394.tgz", + "integrity": "sha512-toahsYQORrP/TPSBQ7sxj4/fJg3YUrD0ksCj/Z4y2vT6EwrE9iC2BspKgQRa4CBoCqxYDNB2blc+mQ1UuzPOxg==", + "cpu": [ + "x64" + ], + "license": "SEE LICENSE IN LICENSE.md", + "optional": true, + "os": [ + "linux" + ], + "bin": { + "copilot-linux-x64": "copilot" + } + }, + "node_modules/@github/copilot-sdk": { + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@github/copilot-sdk/-/copilot-sdk-0.1.19.tgz", + "integrity": "sha512-h/KvYb6g99v9SurNJGxeXUatmP7GO8KHTAb68GYfmgUqH1EUeN5g0xMUc5lvKxAi7hwj2OxRR73dd37zMMiiiQ==", + "license": "MIT", + "dependencies": { + "@github/copilot": "^0.0.394", + "vscode-jsonrpc": "^8.2.1", + "zod": "^4.3.5" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@github/copilot-win32-arm64": { + "version": "0.0.394", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-0.0.394.tgz", + "integrity": "sha512-R7XBP3l+oeDuBrP0KD80ZBEMsZoxAW8QO2MNsDUV8eVrNJnp6KtGHoA+iCsKYKNOD6wHA/q5qm/jR+gpsz46Aw==", + "cpu": [ + "arm64" + ], + "license": "SEE LICENSE IN LICENSE.md", + "optional": true, + "os": [ + "win32" + ], + "bin": { + "copilot-win32-arm64": "copilot.exe" + } + }, + "node_modules/@github/copilot-win32-x64": { + "version": "0.0.394", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-0.0.394.tgz", + "integrity": "sha512-/XYV8srP+pMXbf9Gc3wr58zCzBZvsdA3X4poSvr2uU8yCZ6E4pD0agFaZ1c/CikANJi8nb0Id3kulhEhePz/3A==", + "cpu": [ + "x64" + ], + "license": "SEE LICENSE IN LICENSE.md", + "optional": true, + "os": [ + "win32" + ], + "bin": { + "copilot-win32-x64": "copilot.exe" + } + }, "node_modules/@griffel/core": { "version": "1.19.2", "license": "MIT", @@ -3596,15 +3723,15 @@ } }, "node_modules/@microsoft/vscode-azext-utils": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-utils/-/vscode-azext-utils-4.0.3.tgz", - "integrity": "sha512-Qli06TAOPqW91cRtHI17jIW344ew487FF+YydZ4pM0o0zomi9VR9yJjZ+1vVnhHmTZuFTUCrI6w+I8JByWxM5w==", + "version": "4.0.4", + "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.4.tgz", + "integrity": "sha512-nVaOPZD/CoggmwAIYkkALkua3k5HZFRWyVDMWrXNdwYuoE1PFmAv4c3tbCGlQ7Qv4oVf6T/C7OiSlV4m8XLcDA==", "license": "MIT", "dependencies": { + "@github/copilot-sdk": "0.1.19", "@microsoft/vscode-azureresources-api": "^3.0.0", - "@vscode/extension-telemetry": "^0.9.6", + "@vscode/extension-telemetry": "^1.4.0", "dayjs": "^1.11.2", - "escape-string-regexp": "^2.0.0", "html-to-text": "^9.0.0", "semver": "^7.3.7", "vscode-tas-client": "^0.1.84" @@ -3628,12 +3755,18 @@ "@azure/ms-rest-azure-env": "^2.0.0" } }, - "node_modules/@microsoft/vscode-azext-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "node_modules/@microsoft/vscode-azext-utils/node_modules/@vscode/extension-telemetry": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vscode/extension-telemetry/-/extension-telemetry-1.5.0.tgz", + "integrity": "sha512-8aZ4Ne3PtDtDXfsNBPeTwMoWS4TpgAGeLUcUtxiRKJrlBSi1NCi9sM6EBwK21+WEfEO6JgKszvp4PTTcns1HCw==", + "license": "MIT", + "dependencies": { + "@microsoft/1ds-core-js": "^4.3.10", + "@microsoft/1ds-post-js": "^4.3.10", + "@microsoft/applicationinsights-web-basic": "^3.3.10" + }, "engines": { - "node": ">=8" + "vscode": "^1.75.0" } }, "node_modules/@microsoft/vscode-azureresources-api": { @@ -10727,6 +10860,15 @@ "url": "https://bevry.me/fund" } }, + "node_modules/vscode-jsonrpc": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.1.tgz", + "integrity": "sha512-kdjOSJ2lLIn7r1rtrMbbNCHjyMPfRnowdKjBQ+mGq6NAW5QY2bEZC/khaC5OR8svbbjvLEaIXkOq45e2X9BIbQ==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/vscode-nls": { "version": "4.1.2", "license": "MIT" @@ -11044,6 +11186,15 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zod": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", + "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } } diff --git a/package.json b/package.json index 9c9a7e54d..0478d3034 100644 --- a/package.json +++ b/package.json @@ -848,7 +848,7 @@ "@fluentui/react-icons": "^2.0.265", "@microsoft/vscode-azext-azureutils": "^3.5.2", "@microsoft/vscode-azext-github": "^1.0.7", - "@microsoft/vscode-azext-utils": "^4.0.2", + "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.4.tgz", "@microsoft/vscode-azureresources-api": "^2.6.3", "@vscode/codicons": "0.0.38", "dayjs": "^1.11.3", diff --git a/src/commands/copilot/deployWithCopilot.ts b/src/commands/copilot/deployWithCopilot.ts index 22bdf5111..974413eba 100644 --- a/src/commands/copilot/deployWithCopilot.ts +++ b/src/commands/copilot/deployWithCopilot.ts @@ -6,10 +6,12 @@ import { CopilotUserInput, type IActionContext } from "@microsoft/vscode-azext-utils"; import * as vscode from 'vscode'; import { type ContainerAppItem } from "../../tree/ContainerAppItem"; +import { markAsCopilotUserInput } from "../../utils/copilotUtils"; import { SharedState } from "../../webviews/OpenConfirmationViewStep"; import { deployContainerApp } from "../deployContainerApp/deployContainerApp"; export async function deployWithCopilot(context: IActionContext, node: ContainerAppItem): Promise { context.ui = new CopilotUserInput(vscode, JSON.stringify(node.viewProperties), () => SharedState.currentPanel); + markAsCopilotUserInput(context); await deployContainerApp(context, node); } diff --git a/src/commands/deployContainerApp/deployContainerApp.ts b/src/commands/deployContainerApp/deployContainerApp.ts index cd2bb8c49..3c60733c0 100644 --- a/src/commands/deployContainerApp/deployContainerApp.ts +++ b/src/commands/deployContainerApp/deployContainerApp.ts @@ -4,12 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import { KnownActiveRevisionsMode } from "@azure/arm-appcontainers"; -import { AzureWizard, CopilotUserInput, createSubscriptionContext, nonNullProp, type AzureWizardPromptStep, type IActionContext, type ISubscriptionActionContext, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; +import { AzureWizard, createSubscriptionContext, nonNullProp, type AzureWizardPromptStep, type IActionContext, type ISubscriptionActionContext, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; import { type AzureSubscription } from "@microsoft/vscode-azureresources-api"; -import { ImageSource } from "../../constants"; +import { acrDomain, ImageSource, SupportedRegistries } from "../../constants"; import { type ContainerAppItem } from "../../tree/ContainerAppItem"; import { createActivityContext } from "../../utils/activityUtils"; import { isAzdExtensionInstalled } from "../../utils/azdUtils"; +import { isCopilotUserInput } from "../../utils/copilotUtils"; import { getManagedEnvironmentFromContainerApp } from "../../utils/getResourceUtils"; import { getVerifyProvidersStep } from "../../utils/getVerifyProvidersStep"; import { localize } from "../../utils/localize"; @@ -42,16 +43,24 @@ export async function deployContainerApp(context: IActionContext, node?: Contain throw new Error(localize('multipleContainersNotSupported', 'The container app cannot be updated using "{0}" while having more than one active container. Navigate to the specific container instance and execute "{1}" instead.', deployContainerAppCommandName, editContainerCommandName)); } - // Prompt for image source before initializing the wizard in case we need to redirect the call to 'deployWorkspaceProject' instead - const imageSource: ImageSource = await promptImageSource(subscriptionActionContext); - if (imageSource === ImageSource.RemoteAcrBuild) { - return await deployWorkspaceProject(context, item); - } - return await deployContainerAppInternal(subscriptionActionContext, item, imageSource); + let imageSource: ImageSource | undefined; + let registryDomain: SupportedRegistries | undefined; + if (isCopilotUserInput(context)) { + // If the input is coming from Copilot we want to default to Container Registry as we don't support 'deployWorkspaceProject' flow with Copilot at the moment + imageSource = ImageSource.ContainerRegistry; + registryDomain = acrDomain; + } else { + // Prompt for image source before initializing the wizard in case we need to redirect the call to 'deployWorkspaceProject' instead + imageSource = await promptImageSource(subscriptionActionContext); + if (imageSource === ImageSource.RemoteAcrBuild) { + return await deployWorkspaceProject(context, item); + } + } + return await deployContainerAppInternal(subscriptionActionContext, item, imageSource, registryDomain); } -export async function deployContainerAppInternal(context: ISubscriptionActionContext, node?: ContainerAppItem, imageSource?: ImageSource, subscription?: AzureSubscription): Promise { +export async function deployContainerAppInternal(context: ISubscriptionActionContext, node?: ContainerAppItem, imageSource?: ImageSource, registryDomain?: SupportedRegistries, subscription?: AzureSubscription): Promise { if (isCopilotUserInput(context)) { await openLoadingViewPanel(context); } @@ -74,6 +83,7 @@ export async function deployContainerAppInternal(context: ISubscriptionActionCon containerApp: node.containerApp, managedEnvironment: await getManagedEnvironmentFromContainerApp(context, node.containerApp), imageSource, + registryDomain, activityAttributes: { ...CommandAttributes.DeployContainerAppContainerRegistry, subscription: node.subscription, @@ -137,7 +147,3 @@ async function promptImageSource(context: ISubscriptionActionContext): Promise)[copilotUserInputCanaryKey]; +} + +export function markAsCopilotUserInput(context: IActionContext): void { + (context as unknown as Record)[copilotUserInputCanaryKey] = true; +} diff --git a/src/webviews/OpenConfirmationViewStep.ts b/src/webviews/OpenConfirmationViewStep.ts index e05cd3353..0e5585d22 100644 --- a/src/webviews/OpenConfirmationViewStep.ts +++ b/src/webviews/OpenConfirmationViewStep.ts @@ -3,8 +3,9 @@ * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtUserInput, AzureWizardPromptStep, CopilotUserInput, GoBackError, openUrl, UserCancelledError, type ConfirmationViewProperty, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { AzExtUserInput, AzureWizardPromptStep, GoBackError, openUrl, UserCancelledError, type ConfirmationViewProperty, type IActionContext } from "@microsoft/vscode-azext-utils"; import * as vscode from 'vscode'; +import { isCopilotUserInput } from "../utils/copilotUtils"; import { localize } from "../utils/localize"; import { ConfirmationViewController } from "./ConfirmationViewController"; @@ -54,7 +55,7 @@ export class OpenConfirmationViewStep extends AzureWiz if (SharedState.itemsToClear > 0) { context.telemetry.properties.editingPicks = 'true'; SharedState.editingPicks = true; - if (context.ui instanceof CopilotUserInput) { + if (isCopilotUserInput(context)) { context.ui = new AzExtUserInput(context); } throw new GoBackError(SharedState.itemsToClear); From 27b145fd43d420684e17b23eb08f40ba508d5056 Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Tue, 24 Feb 2026 14:57:48 -0800 Subject: [PATCH 06/13] update to use utils --- package-lock.json | 2 +- src/commands/copilot/deployWithCopilot.ts | 3 +-- .../deployContainerApp/deployContainerApp.ts | 3 +-- src/utils/copilotUtils.ts | 20 ------------------- src/webviews/OpenConfirmationViewStep.ts | 3 +-- 5 files changed, 4 insertions(+), 27 deletions(-) delete mode 100644 src/utils/copilotUtils.ts diff --git a/package-lock.json b/package-lock.json index 086735440..211ec392b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3725,7 +3725,7 @@ "node_modules/@microsoft/vscode-azext-utils": { "version": "4.0.4", "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.4.tgz", - "integrity": "sha512-nVaOPZD/CoggmwAIYkkALkua3k5HZFRWyVDMWrXNdwYuoE1PFmAv4c3tbCGlQ7Qv4oVf6T/C7OiSlV4m8XLcDA==", + "integrity": "sha512-U+0IatzlfBooFmMhtcEg/VpbUZwQ6TnlQIDQboIvRbfH2rgZfqg7/LMYeNsS+0CQJPmbtUQv3/yGT6TAKTTavw==", "license": "MIT", "dependencies": { "@github/copilot-sdk": "0.1.19", diff --git a/src/commands/copilot/deployWithCopilot.ts b/src/commands/copilot/deployWithCopilot.ts index 974413eba..fc4e84320 100644 --- a/src/commands/copilot/deployWithCopilot.ts +++ b/src/commands/copilot/deployWithCopilot.ts @@ -3,10 +3,9 @@ * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CopilotUserInput, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { CopilotUserInput, type IActionContext, markAsCopilotUserInput } from "@microsoft/vscode-azext-utils"; import * as vscode from 'vscode'; import { type ContainerAppItem } from "../../tree/ContainerAppItem"; -import { markAsCopilotUserInput } from "../../utils/copilotUtils"; import { SharedState } from "../../webviews/OpenConfirmationViewStep"; import { deployContainerApp } from "../deployContainerApp/deployContainerApp"; diff --git a/src/commands/deployContainerApp/deployContainerApp.ts b/src/commands/deployContainerApp/deployContainerApp.ts index 3c60733c0..ac14a6c06 100644 --- a/src/commands/deployContainerApp/deployContainerApp.ts +++ b/src/commands/deployContainerApp/deployContainerApp.ts @@ -4,13 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import { KnownActiveRevisionsMode } from "@azure/arm-appcontainers"; -import { AzureWizard, createSubscriptionContext, nonNullProp, type AzureWizardPromptStep, type IActionContext, type ISubscriptionActionContext, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; +import { AzureWizard, createSubscriptionContext, isCopilotUserInput, nonNullProp, type AzureWizardPromptStep, type IActionContext, type ISubscriptionActionContext, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; import { type AzureSubscription } from "@microsoft/vscode-azureresources-api"; import { acrDomain, ImageSource, SupportedRegistries } from "../../constants"; import { type ContainerAppItem } from "../../tree/ContainerAppItem"; import { createActivityContext } from "../../utils/activityUtils"; import { isAzdExtensionInstalled } from "../../utils/azdUtils"; -import { isCopilotUserInput } from "../../utils/copilotUtils"; import { getManagedEnvironmentFromContainerApp } from "../../utils/getResourceUtils"; import { getVerifyProvidersStep } from "../../utils/getVerifyProvidersStep"; import { localize } from "../../utils/localize"; diff --git a/src/utils/copilotUtils.ts b/src/utils/copilotUtils.ts deleted file mode 100644 index 74e4d0a65..000000000 --- a/src/utils/copilotUtils.ts +++ /dev/null @@ -1,20 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { type IActionContext } from "@microsoft/vscode-azext-utils"; - -/** - * Canary property used to identify contexts originating from Copilot, - * avoiding reliance on `instanceof CopilotUserInput` checks. - */ -const copilotUserInputCanaryKey = '_copilotUserInput'; - -export function isCopilotUserInput(context: IActionContext): boolean { - return !!(context as unknown as Record)[copilotUserInputCanaryKey]; -} - -export function markAsCopilotUserInput(context: IActionContext): void { - (context as unknown as Record)[copilotUserInputCanaryKey] = true; -} diff --git a/src/webviews/OpenConfirmationViewStep.ts b/src/webviews/OpenConfirmationViewStep.ts index 0e5585d22..585e64b99 100644 --- a/src/webviews/OpenConfirmationViewStep.ts +++ b/src/webviews/OpenConfirmationViewStep.ts @@ -3,9 +3,8 @@ * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtUserInput, AzureWizardPromptStep, GoBackError, openUrl, UserCancelledError, type ConfirmationViewProperty, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { AzExtUserInput, AzureWizardPromptStep, GoBackError, isCopilotUserInput, openUrl, UserCancelledError, type ConfirmationViewProperty, type IActionContext } from "@microsoft/vscode-azext-utils"; import * as vscode from 'vscode'; -import { isCopilotUserInput } from "../utils/copilotUtils"; import { localize } from "../utils/localize"; import { ConfirmationViewController } from "./ConfirmationViewController"; From dc140c4278f515ec64f33afa49c10c1bd2e5a340 Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Tue, 3 Mar 2026 14:29:30 -0800 Subject: [PATCH 07/13] more changes --- package-lock.json | 26 +++++++++++-------- src/commands/copilot/deployWithCopilot.ts | 2 +- .../deployContainerApp/deployContainerApp.ts | 16 +++++++++--- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 211ec392b..3f0e1cf0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3725,15 +3725,15 @@ "node_modules/@microsoft/vscode-azext-utils": { "version": "4.0.4", "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.4.tgz", - "integrity": "sha512-U+0IatzlfBooFmMhtcEg/VpbUZwQ6TnlQIDQboIvRbfH2rgZfqg7/LMYeNsS+0CQJPmbtUQv3/yGT6TAKTTavw==", + "integrity": "sha512-ynEIT4DSWbFVEJH4lFqkhkHMkVEB4fzu39O4dzAmHBjDBrB8ZAgzQ6jKvh9xcrt/W4gjS3tm7RG5ALYkGBX1dg==", "license": "MIT", "dependencies": { "@github/copilot-sdk": "0.1.19", - "@microsoft/vscode-azureresources-api": "^3.0.0", - "@vscode/extension-telemetry": "^1.4.0", - "dayjs": "^1.11.2", - "html-to-text": "^9.0.0", - "semver": "^7.3.7", + "@microsoft/vscode-azureresources-api": "^3.1.0", + "@vscode/extension-telemetry": "^1.5.0", + "dayjs": "^1.11.19", + "html-to-text": "^9.0.5", + "semver": "^7.7.4", "vscode-tas-client": "^0.1.84" }, "engines": { @@ -3744,9 +3744,9 @@ } }, "node_modules/@microsoft/vscode-azext-utils/node_modules/@microsoft/vscode-azureresources-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@microsoft/vscode-azureresources-api/-/vscode-azureresources-api-3.0.0.tgz", - "integrity": "sha512-IfivhAfLjUQtIJa3kqfZPJanb9m3XVBgRmYrFQtnRp6GWeKGKhkyMC44MunodtX0k4C7A1LmG3lM4z38sxCcpQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@microsoft/vscode-azureresources-api/-/vscode-azureresources-api-3.1.0.tgz", + "integrity": "sha512-jcx5VdDiOftjkjQ+ZXuGQ7xpy7WSKnB7oRLdmGuW3ykaB/PrBSHwStkItSg8l8ycJ0t1kaPOz3eDJP0Ol309jg==", "license": "MIT", "engines": { "vscode": "^1.105.0" @@ -6234,7 +6234,9 @@ "license": "MIT" }, "node_modules/dayjs": { - "version": "1.11.3", + "version": "1.11.19", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz", + "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==", "license": "MIT" }, "node_modules/debug": { @@ -9808,7 +9810,9 @@ } }, "node_modules/semver": { - "version": "7.7.2", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "license": "ISC", "bin": { "semver": "bin/semver.js" diff --git a/src/commands/copilot/deployWithCopilot.ts b/src/commands/copilot/deployWithCopilot.ts index fc4e84320..6f46e5e20 100644 --- a/src/commands/copilot/deployWithCopilot.ts +++ b/src/commands/copilot/deployWithCopilot.ts @@ -11,6 +11,6 @@ import { deployContainerApp } from "../deployContainerApp/deployContainerApp"; export async function deployWithCopilot(context: IActionContext, node: ContainerAppItem): Promise { context.ui = new CopilotUserInput(vscode, JSON.stringify(node.viewProperties), () => SharedState.currentPanel); - markAsCopilotUserInput(context); + markAsCopilotUserInput(context, JSON.stringify(node.viewProperties), () => SharedState.currentPanel); await deployContainerApp(context, node); } diff --git a/src/commands/deployContainerApp/deployContainerApp.ts b/src/commands/deployContainerApp/deployContainerApp.ts index ac14a6c06..81de10367 100644 --- a/src/commands/deployContainerApp/deployContainerApp.ts +++ b/src/commands/deployContainerApp/deployContainerApp.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { KnownActiveRevisionsMode } from "@azure/arm-appcontainers"; -import { AzureWizard, createSubscriptionContext, isCopilotUserInput, nonNullProp, type AzureWizardPromptStep, type IActionContext, type ISubscriptionActionContext, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; +import { AzExtUserInput, AzureWizard, createSubscriptionContext, isCopilotUserInput, nonNullProp, type AzureWizardPromptStep, type IActionContext, type ISubscriptionActionContext, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; import { type AzureSubscription } from "@microsoft/vscode-azureresources-api"; import { acrDomain, ImageSource, SupportedRegistries } from "../../constants"; import { type ContainerAppItem } from "../../tree/ContainerAppItem"; @@ -59,11 +59,21 @@ export async function deployContainerApp(context: IActionContext, node?: Contain return await deployContainerAppInternal(subscriptionActionContext, item, imageSource, registryDomain); } -export async function deployContainerAppInternal(context: ISubscriptionActionContext, node?: ContainerAppItem, imageSource?: ImageSource, registryDomain?: SupportedRegistries, subscription?: AzureSubscription): Promise { +export async function deployContainerAppInternal(context: ISubscriptionActionContext, node?: ContainerAppItem, imageSource?: ImageSource, registryDomain?: SupportedRegistries): Promise { if (isCopilotUserInput(context)) { await openLoadingViewPanel(context); } + const subscription = (context as { azureSubscription?: AzureSubscription }).azureSubscription; + + if (!subscription && !node) { + // If subscription does not exist revert to regular deploy flow + context.ui = new AzExtUserInput(context); + await deployContainerApp(context); + return; + } + + const promptSteps: AzureWizardPromptStep[] = []; if (!node) { @@ -98,7 +108,7 @@ export async function deployContainerAppInternal(context: ISubscriptionActionCon ...context, ...await createActivityContext({ withChildren: true }), subscription: subscription, - //at the moment we are only supporting re run with container registry image source + // at the moment we are only supporting re run with container registry image source imageSource: ImageSource.ContainerRegistry }; } From 845f2fd145eb1ade7724f6f9ecb26402d4dc61c5 Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Wed, 4 Mar 2026 10:26:44 -0800 Subject: [PATCH 08/13] fix loading view --- .../deployContainerApp/deployContainerApp.ts | 160 +++++++++--------- 1 file changed, 83 insertions(+), 77 deletions(-) diff --git a/src/commands/deployContainerApp/deployContainerApp.ts b/src/commands/deployContainerApp/deployContainerApp.ts index 81de10367..3cb567b60 100644 --- a/src/commands/deployContainerApp/deployContainerApp.ts +++ b/src/commands/deployContainerApp/deployContainerApp.ts @@ -14,7 +14,7 @@ import { getManagedEnvironmentFromContainerApp } from "../../utils/getResourceUt import { getVerifyProvidersStep } from "../../utils/getVerifyProvidersStep"; import { localize } from "../../utils/localize"; import { pickContainerApp } from "../../utils/pickItem/pickContainerApp"; -import { OpenConfirmationViewStep } from "../../webviews/OpenConfirmationViewStep"; +import { OpenConfirmationViewStep, SharedState } from "../../webviews/OpenConfirmationViewStep"; import { openLoadingViewPanel } from "../../webviews/OpenLoadingViewStep"; import { CommandAttributes } from "../CommandAttributes"; import { ContainerAppOverwriteConfirmStep } from "../ContainerAppOverwriteConfirmStep"; @@ -56,96 +56,102 @@ export async function deployContainerApp(context: IActionContext, node?: Contain return await deployWorkspaceProject(context, item); } } - return await deployContainerAppInternal(subscriptionActionContext, item, imageSource, registryDomain); + await deployContainerAppInternal(subscriptionActionContext, item, imageSource, registryDomain); } export async function deployContainerAppInternal(context: ISubscriptionActionContext, node?: ContainerAppItem, imageSource?: ImageSource, registryDomain?: SupportedRegistries): Promise { - if (isCopilotUserInput(context)) { - await openLoadingViewPanel(context); - } + try { + if (isCopilotUserInput(context)) { + await openLoadingViewPanel(context); + } - const subscription = (context as { azureSubscription?: AzureSubscription }).azureSubscription; + const subscription = (context as { azureSubscription?: AzureSubscription }).azureSubscription; - if (!subscription && !node) { - // If subscription does not exist revert to regular deploy flow - context.ui = new AzExtUserInput(context); - await deployContainerApp(context); - return; - } + if (!subscription && !node) { + // If subscription does not exist revert to regular deploy flow + context.ui = new AzExtUserInput(context); + await deployContainerApp(context); + return; + } + const promptSteps: AzureWizardPromptStep[] = []; - const promptSteps: AzureWizardPromptStep[] = []; + if (!node) { + promptSteps.push(new ManagedEnvironmentListStep(), new ContainerAppListStep()); + } - if (!node) { - promptSteps.push(new ManagedEnvironmentListStep(), new ContainerAppListStep()); - } + let wizardContext: ContainerAppDeployContext = {} as ContainerAppDeployContext; - let wizardContext: ContainerAppDeployContext = {} as ContainerAppDeployContext; - - if (node && imageSource) { - // If this command gets re run we only want the internal portion of the command to run, so we set the callbackid - context.callbackId = 'containerApps.deployContainerAppInternal'; - wizardContext = { - ...context, - ...await createActivityContext({ withChildren: true }), - subscription: node.subscription, - containerApp: node.containerApp, - managedEnvironment: await getManagedEnvironmentFromContainerApp(context, node.containerApp), - imageSource, - registryDomain, - activityAttributes: { - ...CommandAttributes.DeployContainerAppContainerRegistry, + if (node && imageSource) { + // If this command gets re run we only want the internal portion of the command to run, so we set the callbackid + context.callbackId = 'containerApps.deployContainerAppInternal'; + wizardContext = { + ...context, + ...await createActivityContext({ withChildren: true }), subscription: node.subscription, - }, - }; - - if (isAzdExtensionInstalled()) { - wizardContext.telemetry.properties.isAzdExtensionInstalled = 'true'; + containerApp: node.containerApp, + managedEnvironment: await getManagedEnvironmentFromContainerApp(context, node.containerApp), + imageSource, + registryDomain, + activityAttributes: { + ...CommandAttributes.DeployContainerAppContainerRegistry, + subscription: node.subscription, + }, + }; + + if (isAzdExtensionInstalled()) { + wizardContext.telemetry.properties.isAzdExtensionInstalled = 'true'; + } + wizardContext.telemetry.properties.revisionMode = node.containerApp.revisionsMode; + } else if (subscription) { + wizardContext = { + ...context, + ...await createActivityContext({ withChildren: true }), + subscription: subscription, + // at the moment we are only supporting re run with container registry image source + imageSource: ImageSource.ContainerRegistry + }; } - wizardContext.telemetry.properties.revisionMode = node.containerApp.revisionsMode; - } else if (subscription) { - wizardContext = { - ...context, - ...await createActivityContext({ withChildren: true }), - subscription: subscription, - // at the moment we are only supporting re run with container registry image source - imageSource: ImageSource.ContainerRegistry - }; - } - const confirmationViewTitle: string = localize('summary', 'Summary'); - let confirmationViewDescription: string = localize('viewDescription', 'Please select an input you would like to change. Note: Any input preceding the changed input will need to change as well'); - let confirmationViewTabTitle: string = localize('deployContainerAppTabTitle', 'Summary - Deploy Image to Container App'); - let title: string = localize('deployContainerAppTitle', 'Deploy image to container app'); + const confirmationViewTitle: string = localize('summary', 'Summary'); + let confirmationViewDescription: string = localize('viewDescription', 'Please select an input you would like to change. Note: Any input preceding the changed input will need to change as well'); + let confirmationViewTabTitle: string = localize('deployContainerAppTabTitle', 'Summary - Deploy Image to Container App'); + let title: string = localize('deployContainerAppTitle', 'Deploy image to container app'); - if (isCopilotUserInput(wizardContext)) { - confirmationViewDescription = localize('viewDescription', 'Please review AI generated inputs and select any you would like to modify. Note: Any input preceding the modified input will need to change as well'); - confirmationViewTabTitle = localize('deployContainerAppTabTitle', 'Summary - Deploy Image to Container App using Copilot'); - title = localize('deployContainerAppWithCopilotTitle', 'Deploy image to container app using copilot'); - } + if (isCopilotUserInput(wizardContext)) { + confirmationViewDescription = localize('viewDescription', 'Please review AI generated inputs and select any you would like to modify. Note: Any input preceding the modified input will need to change as well'); + confirmationViewTabTitle = localize('deployContainerAppTabTitle', 'Summary - Deploy Image to Container App using Copilot'); + title = localize('deployContainerAppWithCopilotTitle', 'Deploy image to container app using copilot'); + } - promptSteps.push( - new ContainerAppDeployStartingResourcesLogStep(), - new ImageSourceListStep(), - new ContainerAppOverwriteConfirmStep(), - new OpenConfirmationViewStep(confirmationViewTitle, confirmationViewTabTitle, confirmationViewDescription, title, () => wizard.confirmationViewProperties) - ); - - const wizard = new AzureWizard(wizardContext, { - title: title, - promptSteps: promptSteps, - executeSteps: [ - getVerifyProvidersStep(), - new ContainerAppUpdateStep(), - ], - }); - - await wizard.prompt(); - wizardContext.activityTitle = localize('deployContainerAppActivityTitle', 'Deploy image to container app "{0}"', wizardContext.containerApp?.name); - await wizard.execute(); - - wizardContext.activityAttributes ??= {}; - wizardContext.activityAttributes.azureResource = wizardContext.containerApp; + promptSteps.push( + new ContainerAppDeployStartingResourcesLogStep(), + new ImageSourceListStep(), + new ContainerAppOverwriteConfirmStep(), + new OpenConfirmationViewStep(confirmationViewTitle, confirmationViewTabTitle, confirmationViewDescription, title, () => wizard.confirmationViewProperties) + ); + + const wizard = new AzureWizard(wizardContext, { + title: title, + promptSteps: promptSteps, + executeSteps: [ + getVerifyProvidersStep(), + new ContainerAppUpdateStep(), + ], + }); + + await wizard.prompt(); + wizardContext.activityTitle = localize('deployContainerAppActivityTitle', 'Deploy image to container app "{0}"', wizardContext.containerApp?.name); + await wizard.execute(); + + wizardContext.activityAttributes ??= {}; + wizardContext.activityAttributes.azureResource = wizardContext.containerApp; + } catch (_error) { + if (SharedState.currentPanel?.viewType === 'react-webview-loadingView') { + SharedState.currentPanel.dispose(); + SharedState.currentPanel = undefined; + } + } } async function promptImageSource(context: ISubscriptionActionContext): Promise { From 8d5ec2182959e642f9fb2bc2ebe72cc9390035fa Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Tue, 17 Mar 2026 13:44:54 -0700 Subject: [PATCH 09/13] rework if statements --- package-lock.json | 97 ++++++++----------- .../deployContainerApp/deployContainerApp.ts | 38 +++----- 2 files changed, 54 insertions(+), 81 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8e18af7dc..9fd121598 100644 --- a/package-lock.json +++ b/package-lock.json @@ -468,7 +468,6 @@ "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.10.1.tgz", "integrity": "sha512-Nh5PhEOeY6PrnxNPsEHRr9eimxLwgLlpmguQaHKBinFYA/RU9+kOYVOQqOrTsCL+KSxrLLl1gD8Dk5BFW/7l/w==", "license": "MIT", - "peer": true, "dependencies": { "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.10.0", @@ -745,8 +744,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@azure/ms-rest-azure-env/-/ms-rest-azure-env-2.0.0.tgz", "integrity": "sha512-dG76W7ElfLi+fbTjnZVGj+M9e0BIEJmRxU6fHaUQ12bZBe8EJKYb2GV50YWNaP2uJiVQ5+7nXEVj1VN1UQtaEw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@azure/msal-browser": { "version": "4.29.0", @@ -842,7 +840,6 @@ "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.22.2.tgz", "integrity": "sha512-MzHym+wOi8CLUlKCQu12de0nwcq9k9Kuv43j4Wa++CsCpJwps2eeBQwD2Bu8snkxTtDKDx4GwjuR9E8yC8LNrg==", "license": "MIT", - "peer": true, "dependencies": { "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.10.0", @@ -909,7 +906,6 @@ "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.22.2.tgz", "integrity": "sha512-MzHym+wOi8CLUlKCQu12de0nwcq9k9Kuv43j4Wa++CsCpJwps2eeBQwD2Bu8snkxTtDKDx4GwjuR9E8yC8LNrg==", "license": "MIT", - "peer": true, "dependencies": { "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.10.0", @@ -1689,7 +1685,6 @@ "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.5.tgz", "integrity": "sha512-N0bD2kIPInNHUHehXhMke1rBGs1dwqvC9O9KYMyyjK7iXt7GAhnro7UlcuYcGdS/yYOlq0MAVgrow8IbWJwyqg==", "license": "MIT", - "peer": true, "dependencies": { "@floating-ui/core": "^1.7.4", "@floating-ui/utils": "^0.2.10" @@ -3243,26 +3238,26 @@ } }, "node_modules/@github/copilot": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-0.0.394.tgz", - "integrity": "sha512-koSiaHvVwjgppgh+puxf6dgsR8ql/WST1scS5bjzMsJFfWk7f4xtEXla7TCQfSGoZkCmCsr2Tis27v5TpssiCg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.7.tgz", + "integrity": "sha512-KHBaJ1kbc19pqUMnB9LubPtwWVOaDCzWbzwsJss+DvHyCpr8wP8jR3GEZUnhq3rsuXI96ZKEeEozXM0NqxCAiw==", "license": "SEE LICENSE IN LICENSE.md", "bin": { "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "0.0.394", - "@github/copilot-darwin-x64": "0.0.394", - "@github/copilot-linux-arm64": "0.0.394", - "@github/copilot-linux-x64": "0.0.394", - "@github/copilot-win32-arm64": "0.0.394", - "@github/copilot-win32-x64": "0.0.394" + "@github/copilot-darwin-arm64": "1.0.7", + "@github/copilot-darwin-x64": "1.0.7", + "@github/copilot-linux-arm64": "1.0.7", + "@github/copilot-linux-x64": "1.0.7", + "@github/copilot-win32-arm64": "1.0.7", + "@github/copilot-win32-x64": "1.0.7" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-0.0.394.tgz", - "integrity": "sha512-qDmDFiFaYFW45UhxylN2JyQRLVGLCpkr5UmgbfH5e0aksf+69qytK/MwpD2Cq12KdTjyGMEorlADkSu5eftELA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.7.tgz", + "integrity": "sha512-yQITowpkQYamww59CwcG5JTWV9ahj7nMH6oqObMJaeqXnG7j7dqE/YhLkujQZ3XR8VXAoIa1rZ3TahdMu94gOA==", "cpu": [ "arm64" ], @@ -3276,9 +3271,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-0.0.394.tgz", - "integrity": "sha512-iN4YwSVFxhASiBjLk46f+AzRTNHCvYcmyTKBASxieMIhnDxznYmpo+haFKPCv2lCsEWU8s5LARCnXxxx8J1wKA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.7.tgz", + "integrity": "sha512-23vP5bHaFA030nB3tr+dUUdRm2SqmQbs2fZUQ4F7JeYy59jp9hi8lBdaZp/TeQnjEirAUU9H2HZxsGRIIUWp7g==", "cpu": [ "x64" ], @@ -3292,9 +3287,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-0.0.394.tgz", - "integrity": "sha512-9NeGvmO2tGztuneXZfYAyW3fDk6Pdl6Ffg8MAUaevA/p0awvA+ti/Vh0ZSTcI81nDTjkzONvrcIcjYAN7x0oSg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.7.tgz", + "integrity": "sha512-g0mB98oyXKcpd4sMNBc5n1h3UhLy9AGRlT//VL8BXPSzvlTH/dJP3fdx74pbLSgvz105to/YUMmEAFfv25VNaw==", "cpu": [ "arm64" ], @@ -3308,9 +3303,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-0.0.394.tgz", - "integrity": "sha512-toahsYQORrP/TPSBQ7sxj4/fJg3YUrD0ksCj/Z4y2vT6EwrE9iC2BspKgQRa4CBoCqxYDNB2blc+mQ1UuzPOxg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.7.tgz", + "integrity": "sha512-TRxzvTo9I4ehYJLFHTCJSJYQ4QnO/V9zebqwszxHpJRxuBd7FV4cxLmfOBqZcUpEpZgBH+VJ4OG98BPW7YEtJQ==", "cpu": [ "x64" ], @@ -3324,23 +3319,23 @@ } }, "node_modules/@github/copilot-sdk": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@github/copilot-sdk/-/copilot-sdk-0.1.19.tgz", - "integrity": "sha512-h/KvYb6g99v9SurNJGxeXUatmP7GO8KHTAb68GYfmgUqH1EUeN5g0xMUc5lvKxAi7hwj2OxRR73dd37zMMiiiQ==", + "version": "0.1.32", + "resolved": "https://registry.npmjs.org/@github/copilot-sdk/-/copilot-sdk-0.1.32.tgz", + "integrity": "sha512-mPWM0fw1Gqc/SW8nl45K8abrFH+92fO7y6tRtRl5imjS5hGapLf/dkX5WDrgPtlsflD0c41lFXVUri5NVJwtoA==", "license": "MIT", "dependencies": { - "@github/copilot": "^0.0.394", + "@github/copilot": "^1.0.2", "vscode-jsonrpc": "^8.2.1", - "zod": "^4.3.5" + "zod": "^4.3.6" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@github/copilot-win32-arm64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-0.0.394.tgz", - "integrity": "sha512-R7XBP3l+oeDuBrP0KD80ZBEMsZoxAW8QO2MNsDUV8eVrNJnp6KtGHoA+iCsKYKNOD6wHA/q5qm/jR+gpsz46Aw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.7.tgz", + "integrity": "sha512-4yFgW1K0MlKBrK5BwMIj4nMu5KSFfytNXrs8iOpVgp7erEvKVyN7VXb6SWkoU3M9TfeNlqP6Uje2rxDvgR1u5w==", "cpu": [ "arm64" ], @@ -3354,9 +3349,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-0.0.394.tgz", - "integrity": "sha512-/XYV8srP+pMXbf9Gc3wr58zCzBZvsdA3X4poSvr2uU8yCZ6E4pD0agFaZ1c/CikANJi8nb0Id3kulhEhePz/3A==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.7.tgz", + "integrity": "sha512-RDZlvPf/q6B54wLXJRmI39fc9+pwfcAjSwUqw0FeQruCTQgoUl8eo9NqeVWDFlr3RdzgVSMUiJHc3aiifVG6lA==", "cpu": [ "x64" ], @@ -3747,10 +3742,10 @@ "node_modules/@microsoft/vscode-azext-utils": { "version": "4.0.4", "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.4.tgz", - "integrity": "sha512-ynEIT4DSWbFVEJH4lFqkhkHMkVEB4fzu39O4dzAmHBjDBrB8ZAgzQ6jKvh9xcrt/W4gjS3tm7RG5ALYkGBX1dg==", + "integrity": "sha512-+phplCeF/HMaTrU6K+Fqz96HkB0JpNOXUY1kmr1c078PmOtdyZDQKfBpqM9ht8uG8JbTGgvAN9wijDgIBEwRJw==", "license": "MIT", "dependencies": { - "@github/copilot-sdk": "0.1.19", + "@github/copilot-sdk": "0.1.32", "@microsoft/vscode-azureresources-api": "^3.1.0", "@vscode/extension-telemetry": "^1.5.0", "dayjs": "^1.11.19", @@ -3844,7 +3839,6 @@ "resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.6.tgz", "integrity": "sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==", "license": "MIT", - "peer": true, "dependencies": { "@octokit/auth-token": "^6.0.0", "@octokit/graphql": "^9.0.3", @@ -4833,7 +4827,6 @@ "integrity": "sha512-klQbnPAAiGYFyI02+znpBRLyjL4/BrBd0nyWkdC0s/6xFLkXYQ8OoRrSkqacS1ddVxf/LDyODIKbQ5TgKAf/Fg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.56.1", "@typescript-eslint/types": "8.56.1", @@ -5123,7 +5116,6 @@ "integrity": "sha512-iYN0fDg29+a2Xelle/Y56Xvv7Nc8Thzq4VwpzAF/SIE6918rDicqfsQxV6w1ttr2+SOm+10laGuY9FG2ptEKsQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/mocha": "^10.0.10", "c8": "^10.1.3", @@ -5148,7 +5140,6 @@ "integrity": "sha512-8ukpxv4wYe0iWMRQU18jhzJOHkeGKbnw7xWRX3Zw1WJA4cEKbHcmmLPdPrPtL6rhDcrlCZN+xKRpv09n4gRHYg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "http-proxy-agent": "^7.0.2", "https-proxy-agent": "^7.0.5", @@ -5204,7 +5195,6 @@ "integrity": "sha512-OTm2XdMt2YkpSn2Nx7z2EJtSuhRHsTPYsSK59hr3v8jRArK+2UEoju4Jumn1CmpgoBLGI6ReHLJ/czYltNUW3g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@azure/identity": "^4.1.0", "@secretlint/node": "^10.1.2", @@ -5522,7 +5512,6 @@ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -5977,7 +5966,6 @@ "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=18" } @@ -6617,8 +6605,7 @@ "version": "8.6.0", "resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.6.0.tgz", "integrity": "sha512-SjWyZBHJPbqxHOzckOfo8lHisEaJWmwd23XppYFYVh10bU66/Pn5tkVkbkCMZVdbUE5eTCI2nD8OyIP4Z+uwkA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/embla-carousel-autoplay": { "version": "8.6.0", @@ -6761,7 +6748,6 @@ "dev": true, "hasInstallScript": true, "license": "MIT", - "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -6803,7 +6789,6 @@ "integrity": "sha512-Bk66jpevTcV8KMFzZI1P7MZKZ+uDcrZm2G2egZ2jNIvVnivDpodZI+/KnpL3Jnap0PBdIHU7HwFGB8r+vV5CVw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "chalk": "^4.1.2", "chokidar": "^3.5.3", @@ -6881,7 +6866,6 @@ "integrity": "sha512-VmQ+sifHUbI/IcSopBCF/HO3YiHQx/AVd3UVyYL6weuwW+HvON9VYn5l6Zl1WZzPWXPNZrSQpxwkkZ/VuvJZzg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -9551,7 +9535,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "license": "MIT", - "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -9564,7 +9547,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "license": "MIT", - "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -10769,7 +10751,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -10817,8 +10798,7 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD", - "peer": true + "license": "0BSD" }, "node_modules/tsx": { "version": "4.21.0", @@ -10917,7 +10897,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/src/commands/deployContainerApp/deployContainerApp.ts b/src/commands/deployContainerApp/deployContainerApp.ts index 3cb567b60..c61e3da42 100644 --- a/src/commands/deployContainerApp/deployContainerApp.ts +++ b/src/commands/deployContainerApp/deployContainerApp.ts @@ -42,27 +42,24 @@ export async function deployContainerApp(context: IActionContext, node?: Contain throw new Error(localize('multipleContainersNotSupported', 'The container app cannot be updated using "{0}" while having more than one active container. Navigate to the specific container instance and execute "{1}" instead.', deployContainerAppCommandName, editContainerCommandName)); } - - let imageSource: ImageSource | undefined; - let registryDomain: SupportedRegistries | undefined; - if (isCopilotUserInput(context)) { - // If the input is coming from Copilot we want to default to Container Registry as we don't support 'deployWorkspaceProject' flow with Copilot at the moment - imageSource = ImageSource.ContainerRegistry; - registryDomain = acrDomain; - } else { - // Prompt for image source before initializing the wizard in case we need to redirect the call to 'deployWorkspaceProject' instead - imageSource = await promptImageSource(subscriptionActionContext); - if (imageSource === ImageSource.RemoteAcrBuild) { - return await deployWorkspaceProject(context, item); - } - } - await deployContainerAppInternal(subscriptionActionContext, item, imageSource, registryDomain); + await deployContainerAppInternal(subscriptionActionContext, item); } -export async function deployContainerAppInternal(context: ISubscriptionActionContext, node?: ContainerAppItem, imageSource?: ImageSource, registryDomain?: SupportedRegistries): Promise { +export async function deployContainerAppInternal(context: ISubscriptionActionContext, node?: ContainerAppItem): Promise { try { + let imageSource: ImageSource | undefined; + let registryDomain: SupportedRegistries | undefined; if (isCopilotUserInput(context)) { + // If the input is coming from Copilot we want to default to Container Registry as we don't support 'deployWorkspaceProject' flow with Copilot at the moment + imageSource = ImageSource.ContainerRegistry; + registryDomain = acrDomain; await openLoadingViewPanel(context); + } else { + // Prompt for image source before initializing the wizard in case we need to redirect the call to 'deployWorkspaceProject' instead + imageSource = await promptImageSource(context); + if (imageSource === ImageSource.RemoteAcrBuild) { + return await deployWorkspaceProject(context, node); + } } const subscription = (context as { azureSubscription?: AzureSubscription }).azureSubscription; @@ -74,13 +71,8 @@ export async function deployContainerAppInternal(context: ISubscriptionActionCon return; } - const promptSteps: AzureWizardPromptStep[] = []; - - if (!node) { - promptSteps.push(new ManagedEnvironmentListStep(), new ContainerAppListStep()); - } - let wizardContext: ContainerAppDeployContext = {} as ContainerAppDeployContext; + const promptSteps: AzureWizardPromptStep[] = []; if (node && imageSource) { // If this command gets re run we only want the internal portion of the command to run, so we set the callbackid @@ -104,6 +96,7 @@ export async function deployContainerAppInternal(context: ISubscriptionActionCon } wizardContext.telemetry.properties.revisionMode = node.containerApp.revisionsMode; } else if (subscription) { + promptSteps.push(new ManagedEnvironmentListStep(), new ContainerAppListStep()); wizardContext = { ...context, ...await createActivityContext({ withChildren: true }), @@ -147,6 +140,7 @@ export async function deployContainerAppInternal(context: ISubscriptionActionCon wizardContext.activityAttributes ??= {}; wizardContext.activityAttributes.azureResource = wizardContext.containerApp; } catch (_error) { + // Because rg does not have web views we need to catch the error here and dispose of the web view if it exists if (SharedState.currentPanel?.viewType === 'react-webview-loadingView') { SharedState.currentPanel.dispose(); SharedState.currentPanel = undefined; From 63251a8ac01771a0d4a407b911e18154baf96967 Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Mon, 30 Mar 2026 10:38:25 -0700 Subject: [PATCH 10/13] updates --- package-lock.json | 66 +++++++++++++++++-- package.json | 3 +- .../deployContainerApp/deployContainerApp.ts | 11 ++-- 3 files changed, 68 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9fd121598..ebcb8f0d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "@fluentui/react-icons": "^2.0.265", "@microsoft/vscode-azext-azureutils": "^4.0.1", "@microsoft/vscode-azext-github": "^2.0.1", - "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.4.tgz", + "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.6.tgz", "@microsoft/vscode-azureresources-api": "^3.1.0", "@vscode/codicons": "0.0.38", "dayjs": "^1.11.3", @@ -43,6 +43,7 @@ }, "devDependencies": { "@azure/ms-rest-azure-env": "^2.0.0", + "@github/copilot-sdk": "0.1.32", "@microsoft/vscode-azext-eng": "1.0.0-alpha.11", "@types/deep-eql": "^4.0.0", "@types/fs-extra": "^8.1.1", @@ -3740,13 +3741,14 @@ } }, "node_modules/@microsoft/vscode-azext-utils": { - "version": "4.0.4", - "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.4.tgz", - "integrity": "sha512-+phplCeF/HMaTrU6K+Fqz96HkB0JpNOXUY1kmr1c078PmOtdyZDQKfBpqM9ht8uG8JbTGgvAN9wijDgIBEwRJw==", + "version": "4.0.6", + "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.6.tgz", + "integrity": "sha512-zq/jigwJYh/ojZQKBmYwXh8FtdhRRu7bWJjWoEvixpJmH+ZwWx0gf01bR5Vx6lFjFoNp14VprqJUMzybhMmpqw==", "license": "MIT", "dependencies": { - "@github/copilot-sdk": "0.1.32", + "@github/copilot-sdk": "*", "@microsoft/vscode-azureresources-api": "^3.1.0", + "@microsoft/vscode-processutils": "^0.2.1", "@vscode/extension-telemetry": "^1.5.0", "dayjs": "^1.11.19", "html-to-text": "^9.0.5", @@ -3757,7 +3759,13 @@ "vscode": "^1.105.0" }, "peerDependencies": { - "@azure/ms-rest-azure-env": "^2.0.0" + "@azure/ms-rest-azure-env": "^2.0.0", + "@github/copilot-sdk": "0.1.32" + }, + "peerDependenciesMeta": { + "@github/copilot-sdk": { + "optional": true + } } }, "node_modules/@microsoft/vscode-azureresources-api": { @@ -3772,6 +3780,43 @@ "@azure/ms-rest-azure-env": "^2.0.0" } }, + "node_modules/@microsoft/vscode-processutils": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@microsoft/vscode-processutils/-/vscode-processutils-0.2.1.tgz", + "integrity": "sha512-aa0JJqcNkFetPfkoA0cOy+wCdC0RN88vho33J8niwuBv//AceNv4vqpY9C3PnjBojr2IRmAVvElINjFhTDnWrg==", + "license": "See LICENSE in the project root for license information.", + "dependencies": { + "tree-kill": "^1.2.2", + "which": "^5.0.0" + }, + "engines": { + "vscode": "^1.105.0" + } + }, + "node_modules/@microsoft/vscode-processutils/node_modules/isexe": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.5.tgz", + "integrity": "sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@microsoft/vscode-processutils/node_modules/which": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", + "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/@nevware21/ts-async": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/@nevware21/ts-async/-/ts-async-0.5.5.tgz", @@ -10781,6 +10826,15 @@ "node": ">=8.0" } }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, "node_modules/ts-api-utils": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", diff --git a/package.json b/package.json index af40579d3..8438aa5ea 100644 --- a/package.json +++ b/package.json @@ -819,6 +819,7 @@ }, "devDependencies": { "@azure/ms-rest-azure-env": "^2.0.0", + "@github/copilot-sdk": "0.1.32", "@microsoft/vscode-azext-eng": "1.0.0-alpha.11", "@types/deep-eql": "^4.0.0", "@types/fs-extra": "^8.1.1", @@ -848,7 +849,7 @@ "@fluentui/react-icons": "^2.0.265", "@microsoft/vscode-azext-azureutils": "^4.0.1", "@microsoft/vscode-azext-github": "^2.0.1", - "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.4.tgz", + "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.6.tgz", "@microsoft/vscode-azureresources-api": "^3.1.0", "@vscode/codicons": "0.0.38", "dayjs": "^1.11.3", diff --git a/src/commands/deployContainerApp/deployContainerApp.ts b/src/commands/deployContainerApp/deployContainerApp.ts index c61e3da42..60dd0de00 100644 --- a/src/commands/deployContainerApp/deployContainerApp.ts +++ b/src/commands/deployContainerApp/deployContainerApp.ts @@ -63,9 +63,10 @@ export async function deployContainerAppInternal(context: ISubscriptionActionCon } const subscription = (context as { azureSubscription?: AzureSubscription }).azureSubscription; + const runFromCopilot: boolean = !!subscription; - if (!subscription && !node) { - // If subscription does not exist revert to regular deploy flow + if (!runFromCopilot && !node) { + // If the subscription does not exist revert to regular deploy flow context.ui = new AzExtUserInput(context); await deployContainerApp(context); return; @@ -74,7 +75,7 @@ export async function deployContainerAppInternal(context: ISubscriptionActionCon let wizardContext: ContainerAppDeployContext = {} as ContainerAppDeployContext; const promptSteps: AzureWizardPromptStep[] = []; - if (node && imageSource) { + if (node) { // If this command gets re run we only want the internal portion of the command to run, so we set the callbackid context.callbackId = 'containerApps.deployContainerAppInternal'; wizardContext = { @@ -95,12 +96,12 @@ export async function deployContainerAppInternal(context: ISubscriptionActionCon wizardContext.telemetry.properties.isAzdExtensionInstalled = 'true'; } wizardContext.telemetry.properties.revisionMode = node.containerApp.revisionsMode; - } else if (subscription) { + } else if (runFromCopilot) { promptSteps.push(new ManagedEnvironmentListStep(), new ContainerAppListStep()); wizardContext = { ...context, ...await createActivityContext({ withChildren: true }), - subscription: subscription, + subscription: nonNullProp(context as { azureSubscription?: AzureSubscription }, 'azureSubscription'), // at the moment we are only supporting re run with container registry image source imageSource: ImageSource.ContainerRegistry }; From 1827c97307b154c0b5c64f60a0f57e342a195edd Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Wed, 1 Apr 2026 10:07:30 -0700 Subject: [PATCH 11/13] changes --- package-lock.json | 8 ++++++-- package.json | 1 + src/commands/copilot/deployWithCopilot.ts | 3 ++- .../deployContainerApp/deployContainerApp.ts | 17 ++++++++--------- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index ebcb8f0d7..7f915081b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "@azure/storage-blob": "^12.4.1", "@fluentui/react-components": "^9.56.2", "@fluentui/react-icons": "^2.0.265", + "@github/copilot-sdk": "*", "@microsoft/vscode-azext-azureutils": "^4.0.1", "@microsoft/vscode-azext-github": "^2.0.1", "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.6.tgz", @@ -3242,6 +3243,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.7.tgz", "integrity": "sha512-KHBaJ1kbc19pqUMnB9LubPtwWVOaDCzWbzwsJss+DvHyCpr8wP8jR3GEZUnhq3rsuXI96ZKEeEozXM0NqxCAiw==", + "devOptional": true, "license": "SEE LICENSE IN LICENSE.md", "bin": { "copilot": "npm-loader.js" @@ -3323,6 +3325,7 @@ "version": "0.1.32", "resolved": "https://registry.npmjs.org/@github/copilot-sdk/-/copilot-sdk-0.1.32.tgz", "integrity": "sha512-mPWM0fw1Gqc/SW8nl45K8abrFH+92fO7y6tRtRl5imjS5hGapLf/dkX5WDrgPtlsflD0c41lFXVUri5NVJwtoA==", + "devOptional": true, "license": "MIT", "dependencies": { "@github/copilot": "^1.0.2", @@ -3743,10 +3746,9 @@ "node_modules/@microsoft/vscode-azext-utils": { "version": "4.0.6", "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.6.tgz", - "integrity": "sha512-zq/jigwJYh/ojZQKBmYwXh8FtdhRRu7bWJjWoEvixpJmH+ZwWx0gf01bR5Vx6lFjFoNp14VprqJUMzybhMmpqw==", + "integrity": "sha512-hOkD3N5ucISLEo5YHAX6AxwJgTfw3JgD9EBEElRTwhA0UmXG2Ike7xcV52qQDRGf+16H3ue7m7vdZ1QvQklCEw==", "license": "MIT", "dependencies": { - "@github/copilot-sdk": "*", "@microsoft/vscode-azureresources-api": "^3.1.0", "@microsoft/vscode-processutils": "^0.2.1", "@vscode/extension-telemetry": "^1.5.0", @@ -11132,6 +11134,7 @@ "version": "8.2.1", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.1.tgz", "integrity": "sha512-kdjOSJ2lLIn7r1rtrMbbNCHjyMPfRnowdKjBQ+mGq6NAW5QY2bEZC/khaC5OR8svbbjvLEaIXkOq45e2X9BIbQ==", + "devOptional": true, "license": "MIT", "engines": { "node": ">=14.0.0" @@ -11464,6 +11467,7 @@ "version": "4.3.6", "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", + "devOptional": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" diff --git a/package.json b/package.json index 8438aa5ea..79bcc4384 100644 --- a/package.json +++ b/package.json @@ -847,6 +847,7 @@ "@azure/storage-blob": "^12.4.1", "@fluentui/react-components": "^9.56.2", "@fluentui/react-icons": "^2.0.265", + "@github/copilot-sdk": "*", "@microsoft/vscode-azext-azureutils": "^4.0.1", "@microsoft/vscode-azext-github": "^2.0.1", "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.6.tgz", diff --git a/src/commands/copilot/deployWithCopilot.ts b/src/commands/copilot/deployWithCopilot.ts index 6f46e5e20..243ac2008 100644 --- a/src/commands/copilot/deployWithCopilot.ts +++ b/src/commands/copilot/deployWithCopilot.ts @@ -3,7 +3,8 @@ * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CopilotUserInput, type IActionContext, markAsCopilotUserInput } from "@microsoft/vscode-azext-utils"; +import { type IActionContext, } from "@microsoft/vscode-azext-utils"; +import { CopilotUserInput, markAsCopilotUserInput } from "@microsoft/vscode-azext-utils/copilot"; import * as vscode from 'vscode'; import { type ContainerAppItem } from "../../tree/ContainerAppItem"; import { SharedState } from "../../webviews/OpenConfirmationViewStep"; diff --git a/src/commands/deployContainerApp/deployContainerApp.ts b/src/commands/deployContainerApp/deployContainerApp.ts index 60dd0de00..af8b972d5 100644 --- a/src/commands/deployContainerApp/deployContainerApp.ts +++ b/src/commands/deployContainerApp/deployContainerApp.ts @@ -42,24 +42,23 @@ export async function deployContainerApp(context: IActionContext, node?: Contain throw new Error(localize('multipleContainersNotSupported', 'The container app cannot be updated using "{0}" while having more than one active container. Navigate to the specific container instance and execute "{1}" instead.', deployContainerAppCommandName, editContainerCommandName)); } - await deployContainerAppInternal(subscriptionActionContext, item); + // Prompt for image source before initializing the wizard in case we need to redirect the call to 'deployWorkspaceProject' instead + const imageSource = await promptImageSource(subscriptionActionContext); + if (imageSource === ImageSource.RemoteAcrBuild) { + return await deployWorkspaceProject(subscriptionActionContext, item); + } + + await deployContainerAppInternal(subscriptionActionContext, item, imageSource); } -export async function deployContainerAppInternal(context: ISubscriptionActionContext, node?: ContainerAppItem): Promise { +export async function deployContainerAppInternal(context: ISubscriptionActionContext, node?: ContainerAppItem, imageSource?: ImageSource): Promise { try { - let imageSource: ImageSource | undefined; let registryDomain: SupportedRegistries | undefined; if (isCopilotUserInput(context)) { // If the input is coming from Copilot we want to default to Container Registry as we don't support 'deployWorkspaceProject' flow with Copilot at the moment imageSource = ImageSource.ContainerRegistry; registryDomain = acrDomain; await openLoadingViewPanel(context); - } else { - // Prompt for image source before initializing the wizard in case we need to redirect the call to 'deployWorkspaceProject' instead - imageSource = await promptImageSource(context); - if (imageSource === ImageSource.RemoteAcrBuild) { - return await deployWorkspaceProject(context, node); - } } const subscription = (context as { azureSubscription?: AzureSubscription }).azureSubscription; From ffae38b8c9a320a67eb3662940dabf236f865795 Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Thu, 2 Apr 2026 10:46:21 -0700 Subject: [PATCH 12/13] update utils --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7f915081b..fc6872406 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "@github/copilot-sdk": "*", "@microsoft/vscode-azext-azureutils": "^4.0.1", "@microsoft/vscode-azext-github": "^2.0.1", - "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.6.tgz", + "@microsoft/vscode-azext-utils": "^4.0.7", "@microsoft/vscode-azureresources-api": "^3.1.0", "@vscode/codicons": "0.0.38", "dayjs": "^1.11.3", @@ -3744,9 +3744,9 @@ } }, "node_modules/@microsoft/vscode-azext-utils": { - "version": "4.0.6", - "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.6.tgz", - "integrity": "sha512-hOkD3N5ucISLEo5YHAX6AxwJgTfw3JgD9EBEElRTwhA0UmXG2Ike7xcV52qQDRGf+16H3ue7m7vdZ1QvQklCEw==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-utils/-/vscode-azext-utils-4.0.7.tgz", + "integrity": "sha512-ec9yhw7saENtwYzfbF7dLBCoXSbQ/XKwF4kKe73eR9NRGCAhTXIGIKlS6Lba/6ubjwqvWzIatUMcaDc7cVFsMA==", "license": "MIT", "dependencies": { "@microsoft/vscode-azureresources-api": "^3.1.0", diff --git a/package.json b/package.json index 79bcc4384..d151b9365 100644 --- a/package.json +++ b/package.json @@ -850,7 +850,7 @@ "@github/copilot-sdk": "*", "@microsoft/vscode-azext-azureutils": "^4.0.1", "@microsoft/vscode-azext-github": "^2.0.1", - "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.6.tgz", + "@microsoft/vscode-azext-utils": "^4.0.7", "@microsoft/vscode-azureresources-api": "^3.1.0", "@vscode/codicons": "0.0.38", "dayjs": "^1.11.3", From 4a2dd2606838865f261f6a0c36505e33ddd19da8 Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Thu, 2 Apr 2026 10:59:19 -0700 Subject: [PATCH 13/13] fix linter --- src/commands/createContainerApp/ContainerAppListStep.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/createContainerApp/ContainerAppListStep.ts b/src/commands/createContainerApp/ContainerAppListStep.ts index 7f8eb7adb..c71a509ad 100644 --- a/src/commands/createContainerApp/ContainerAppListStep.ts +++ b/src/commands/createContainerApp/ContainerAppListStep.ts @@ -64,7 +64,7 @@ export class ContainerAppListStep extends A name: localize('containerApp', 'Container App'), value: nonNullValueAndProp(context.containerApp, 'name'), contextPropertyName: 'containerApp', - } + }; } private async getPicks(context: T): Promise[]> {