From 97928e311101ea2f8600d65e8fc2feb1759eaaa6 Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Tue, 2 Dec 2025 13:06:24 -0800 Subject: [PATCH 1/6] add new rerun command --- package-lock.json | 36 +++++++++++++++++++++++++++++--- package.json | 17 ++++++++++++++- package.nls.json | 1 + src/commands/registerCommands.ts | 2 ++ src/copilot/reRunWithCopilot.ts | 32 ++++++++++++++++++++++++++++ 5 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 src/copilot/reRunWithCopilot.ts diff --git a/package-lock.json b/package-lock.json index 2a905869b..36b485cf8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0", "@microsoft/vscode-azext-azureauth": "^5.1.1", "@microsoft/vscode-azext-azureutils": "^4.0.0", - "@microsoft/vscode-azext-utils": "^4.0.0", + "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.0.tgz", "buffer": "^6.0.3", "form-data": "^4.0.4", "fs-extra": "^11.3.0", @@ -1017,6 +1017,36 @@ "@azure/ms-rest-azure-env": "^2.0.0" } }, + "node_modules/@microsoft/vscode-azext-azureutils/node_modules/@microsoft/vscode-azext-utils": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-utils/-/vscode-azext-utils-4.0.2.tgz", + "integrity": "sha512-RpHKn4hcDTtJpMaif0jb8ulfDEFPT/C/U3wcx93eLxgQhDVFQ5aC49KybxodNp89dVUXhNUHhu6gdNDPfXt6Pg==", + "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-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-dev": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-dev/-/vscode-azext-dev-3.0.1.tgz", @@ -1069,8 +1099,8 @@ }, "node_modules/@microsoft/vscode-azext-utils": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-utils/-/vscode-azext-utils-4.0.0.tgz", - "integrity": "sha512-c5e4LD8Xkir6KqAVzIF0f+u1w/QDH7b3AFgYYcWqPyYN0HVp+YCvI97zP1uqb/YzZFTYjr2NbO54xgtftsePAA==", + "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.0.tgz", + "integrity": "sha512-AWPegfYXln1f3GpApRl8DGVAtrM77Kf59mJDMrS8tK+FZBFFzmGercDaE8R0Ow5blbihZNa5tIaLO5qA1TDcPg==", "license": "MIT", "dependencies": { "@microsoft/vscode-azureresources-api": "^3.0.0", diff --git a/package.json b/package.json index db85557d4..eb1ac81ff 100644 --- a/package.json +++ b/package.json @@ -337,6 +337,12 @@ "category": "Azure", "icon": "$(chat-sparkle)" }, + { + "command": "azureResourceGroups.reRunWithCopilot", + "title": "%azureResourceGroups.reRunWithCopilot%", + "category": "Azure", + "icon": "$(refresh)" + }, { "command": "azureTenantsView.refresh", "title": "%azureResourceGroups.refresh%", @@ -624,6 +630,11 @@ "command": "azureResourceGroups.askAgentAboutActivityLogItem", "when": "view == azureActivityLog && viewItem =~ /activityItem/i", "group": "inline" + }, + { + "command": "azureResourceGroups.reRunWithCopilot", + "when": "view == azureActivityLog && viewItem =~ /activityItem/i", + "group": "inline" } ], "commandPalette": [ @@ -678,6 +689,10 @@ { "command": "azureResourceGroups.askAgentAboutActivityLogItem", "when": "never" + }, + { + "command": "azureResourceGroups.reRunWithCopilot", + "when": "never" } ], "azureResourceGroups.groupBy": [ @@ -946,7 +961,7 @@ "@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0", "@microsoft/vscode-azext-azureauth": "^5.1.1", "@microsoft/vscode-azext-azureutils": "^4.0.0", - "@microsoft/vscode-azext-utils": "^4.0.0", + "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.0.tgz", "buffer": "^6.0.3", "form-data": "^4.0.4", "fs-extra": "^11.3.0", diff --git a/package.nls.json b/package.nls.json index 766e8a322..70704bfe5 100644 --- a/package.nls.json +++ b/package.nls.json @@ -55,6 +55,7 @@ "Do not translate '@azure'; it is syntax for addressing the Azure agent." ] }, + "azureResourceGroups.reRunWithCopilot": "Rerun Command with Copilot...", "walkthrough.askAzure.description": { "message": "Enter @azure in the GitHub Copilot Chat to start a conversation.\n @azure can help with learning about Azure, deploying resources, troubleshooting web app problems, querying Azure costs and more without having to switch to the Azure Portal.\n[Chat with @azure](command:azureResourceGroups.askAzure?%5B%22What%20kinds%20of%20things%20can%20you%20help%20me%20with?%22%5D)", "comment": [ diff --git a/src/commands/registerCommands.ts b/src/commands/registerCommands.ts index 873ae56a6..05febeb48 100644 --- a/src/commands/registerCommands.ts +++ b/src/commands/registerCommands.ts @@ -10,6 +10,7 @@ import { askAgentAboutActivityLog } from '../chat/askAgentAboutActivityLog/askAg import { askAgentAboutResource } from '../chat/askAgentAboutResource'; import { askAzureInCommandPalette } from '../chat/askAzure'; import { uploadFileToCloudShell } from '../cloudConsole/uploadFileToCloudShell'; +import { reRunWithCopilot } from '../copilot/reRunWithCopilot'; import { ext } from '../extensionVariables'; import { TargetServiceRoleAssignmentItem } from '../managedIdentity/TargetServiceRoleAssignmentItem'; import { BranchDataItemWrapper } from '../tree/BranchDataItemWrapper'; @@ -134,6 +135,7 @@ export function registerCommands(): void { registerCommand("azureResourceGroups.askAgentAboutActivityLog", async (context: IActionContext, _node: ActivityItem) => await askAgentAboutActivityLog(context)); registerCommandWithTreeNodeUnwrapping("azureResourceGroups.askAgentAboutActivityLogItem", askAgentAboutActivityLog); registerCommandWithTreeNodeUnwrapping<{ id?: string }>("azureResourceGroups.askAgentAboutResource", (context, node) => askAgentAboutResource(context, node)); + registerCommand('azureResourceGroups.reRunWithCopilot', async (context: IActionContext, item: ActivityItem) => await reRunWithCopilot(context, item)); } async function handleAzExtTreeItemRefresh(context: IActionContext, node?: ResourceGroupsItem): Promise { diff --git a/src/copilot/reRunWithCopilot.ts b/src/copilot/reRunWithCopilot.ts new file mode 100644 index 000000000..adfcf65d8 --- /dev/null +++ b/src/copilot/reRunWithCopilot.ts @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.md in the project root for license information. +*--------------------------------------------------------------------------------------------*/ + +import { CopilotUserInput, executeCommandWithAddedContext, type IActionContext } from "@microsoft/vscode-azext-utils"; +import * as vscode from "vscode"; +import { ActivitySelectedCache } from "../chat/askAgentAboutActivityLog/ActivitySelectedCache"; +import { convertActivityTreeToSimpleObjectArray, ConvertedActivityItem } from "../chat/tools/GetAzureActivityLog/convertActivityTree"; +import { GetAzureActivityLogContext } from "../chat/tools/GetAzureActivityLog/GetAzureActivityLogContext"; +import { ActivityItem } from "../tree/activityLog/ActivityItem"; + +export async function reRunWithCopilot(context: IActionContext, item: ActivityItem): Promise { + const activitySelectedCache = ActivitySelectedCache.getInstance(); + activitySelectedCache.addActivity(item.id); + + const activityContext: GetAzureActivityLogContext = { + ...context, + activitySelectedCache: activitySelectedCache + } + + const activityItems: ConvertedActivityItem[] = await convertActivityTreeToSimpleObjectArray(activityContext); + context.ui = new CopilotUserInput(vscode, JSON.stringify(activityItems)); + + // An item will always be passed in so we will only need to look at the first item in the array + const callbackId = activityItems[0]?.callbackId; + if (callbackId) { + await executeCommandWithAddedContext(callbackId, context) + } else { + throw new Error(vscode.l10n.t('Failed to rerun with Copilot. Activity item callback ID not found.')); + } +} From 0a7414bbc68277918e75bdbc88073495971c8680 Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Wed, 10 Dec 2025 14:59:21 -0800 Subject: [PATCH 2/6] pass in subscription --- package-lock.json | 38 ++++----------------------------- package.json | 2 +- src/copilot/reRunWithCopilot.ts | 12 +++++++++-- 3 files changed, 15 insertions(+), 37 deletions(-) diff --git a/package-lock.json b/package-lock.json index 36b485cf8..5eca97092 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0", "@microsoft/vscode-azext-azureauth": "^5.1.1", "@microsoft/vscode-azext-azureutils": "^4.0.0", - "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.0.tgz", + "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.2.tgz", "buffer": "^6.0.3", "form-data": "^4.0.4", "fs-extra": "^11.3.0", @@ -1017,36 +1017,6 @@ "@azure/ms-rest-azure-env": "^2.0.0" } }, - "node_modules/@microsoft/vscode-azext-azureutils/node_modules/@microsoft/vscode-azext-utils": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-utils/-/vscode-azext-utils-4.0.2.tgz", - "integrity": "sha512-RpHKn4hcDTtJpMaif0jb8ulfDEFPT/C/U3wcx93eLxgQhDVFQ5aC49KybxodNp89dVUXhNUHhu6gdNDPfXt6Pg==", - "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-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-dev": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-dev/-/vscode-azext-dev-3.0.1.tgz", @@ -1098,9 +1068,9 @@ } }, "node_modules/@microsoft/vscode-azext-utils": { - "version": "4.0.0", - "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.0.tgz", - "integrity": "sha512-AWPegfYXln1f3GpApRl8DGVAtrM77Kf59mJDMrS8tK+FZBFFzmGercDaE8R0Ow5blbihZNa5tIaLO5qA1TDcPg==", + "version": "4.0.2", + "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.2.tgz", + "integrity": "sha512-5r7QaInfYnjc6OZDmOvFnQFee0t3cpqWs2JWGLdhsuy0K/7PT66EUZB8z10u9lpf8x1SyVGDUx894Rl1mK+qVQ==", "license": "MIT", "dependencies": { "@microsoft/vscode-azureresources-api": "^3.0.0", diff --git a/package.json b/package.json index eb1ac81ff..31233df28 100644 --- a/package.json +++ b/package.json @@ -961,7 +961,7 @@ "@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0", "@microsoft/vscode-azext-azureauth": "^5.1.1", "@microsoft/vscode-azext-azureutils": "^4.0.0", - "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.0.tgz", + "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.2.tgz", "buffer": "^6.0.3", "form-data": "^4.0.4", "fs-extra": "^11.3.0", diff --git a/src/copilot/reRunWithCopilot.ts b/src/copilot/reRunWithCopilot.ts index adfcf65d8..a906adf0e 100644 --- a/src/copilot/reRunWithCopilot.ts +++ b/src/copilot/reRunWithCopilot.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CopilotUserInput, executeCommandWithAddedContext, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { CopilotUserInput, createSubscriptionContext, executeCommandWithAddedContext, type IActionContext } from "@microsoft/vscode-azext-utils"; import * as vscode from "vscode"; import { ActivitySelectedCache } from "../chat/askAgentAboutActivityLog/ActivitySelectedCache"; import { convertActivityTreeToSimpleObjectArray, ConvertedActivityItem } from "../chat/tools/GetAzureActivityLog/convertActivityTree"; @@ -22,10 +22,18 @@ export async function reRunWithCopilot(context: IActionContext, item: ActivityIt const activityItems: ConvertedActivityItem[] = await convertActivityTreeToSimpleObjectArray(activityContext); context.ui = new CopilotUserInput(vscode, JSON.stringify(activityItems)); + // if subscription exists then add it to the context and + let wizardContext = context + const subscription = activityItems[0].activityAttributes?.subscription + if (subscription) { + const subscriptionContext = createSubscriptionContext(subscription); + wizardContext = { ...context, ...subscriptionContext }; + } + // An item will always be passed in so we will only need to look at the first item in the array const callbackId = activityItems[0]?.callbackId; if (callbackId) { - await executeCommandWithAddedContext(callbackId, context) + await executeCommandWithAddedContext(callbackId, wizardContext, undefined, undefined, subscription) } else { throw new Error(vscode.l10n.t('Failed to rerun with Copilot. Activity item callback ID not found.')); } From 885ba92fb9d435343269223136002688b1b0ecbb Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Wed, 10 Dec 2025 14:59:38 -0800 Subject: [PATCH 3/6] small change --- src/copilot/reRunWithCopilot.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/copilot/reRunWithCopilot.ts b/src/copilot/reRunWithCopilot.ts index a906adf0e..cd8786d96 100644 --- a/src/copilot/reRunWithCopilot.ts +++ b/src/copilot/reRunWithCopilot.ts @@ -33,6 +33,7 @@ export async function reRunWithCopilot(context: IActionContext, item: ActivityIt // An item will always be passed in so we will only need to look at the first item in the array const callbackId = activityItems[0]?.callbackId; if (callbackId) { + // todo: change this as the subscription may not always be the third thing passed in await executeCommandWithAddedContext(callbackId, wizardContext, undefined, undefined, subscription) } else { throw new Error(vscode.l10n.t('Failed to rerun with Copilot. Activity item callback ID not found.')); From a3018d345d039a2acf3025b399654a6f7f93814e Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Tue, 3 Mar 2026 14:32:09 -0800 Subject: [PATCH 4/6] changes --- package-lock.json | 192 +++++++++++++++--- package.json | 10 +- package.nls.json | 2 +- src/commands/registerCommands.ts | 4 +- ...ot.ts => rerunAzureActivityWithCopilot.ts} | 19 +- 5 files changed, 186 insertions(+), 41 deletions(-) rename src/copilot/{reRunWithCopilot.ts => rerunAzureActivityWithCopilot.ts} (72%) diff --git a/package-lock.json b/package-lock.json index 7b5cd4679..8d34040c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0", "@microsoft/vscode-azext-azureauth": "^5.1.1", "@microsoft/vscode-azext-azureutils": "^4.0.0", - "@microsoft/vscode-azext-utils": "^4.0.3", + "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.4.tgz", "form-data": "^4.0.4", "fs-extra": "^11.3.0", "jsonc-parser": "^2.2.1", @@ -1133,6 +1133,133 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "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/@humanfs/core": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", @@ -1562,15 +1689,16 @@ }, "node_modules/@microsoft/vscode-azext-utils": { "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-utils/-/vscode-azext-utils-4.0.4.tgz", - "integrity": "sha512-E0SRsJKHIfbjh7O8gZegd6PO4/1enU9DiI7owjkoxYLQoZJTCbVa9/seEcwsppi87yzKfuPJBHh7ed0PJ8OQAA==", + "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.4.tgz", + "integrity": "sha512-ynEIT4DSWbFVEJH4lFqkhkHMkVEB4fzu39O4dzAmHBjDBrB8ZAgzQ6jKvh9xcrt/W4gjS3tm7RG5ALYkGBX1dg==", "license": "MIT", "dependencies": { - "@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", + "@github/copilot-sdk": "0.1.19", + "@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": { @@ -1581,9 +1709,9 @@ } }, "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" @@ -1602,9 +1730,9 @@ } }, "node_modules/@nevware21/ts-utils": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/@nevware21/ts-utils/-/ts-utils-0.12.5.tgz", - "integrity": "sha512-JPQZWPKQJjj7kAftdEZL0XDFfbMgXCGiUAZe0d7EhLC3QlXTlZdSckGqqRIQ2QNl0VTEZyZUvRBw6Ednw089Fw==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@nevware21/ts-utils/-/ts-utils-0.13.0.tgz", + "integrity": "sha512-F3mD+DsUn9OiZmZc5tg0oKqrJCtiCstwx+wE+DNzFYh2cCRUuzTYdK9zGGP/au2BWvbOQ6Tqlbjr2+dT1P3AlQ==", "license": "MIT" }, "node_modules/@nodelib/fs.scandir": { @@ -2408,9 +2536,9 @@ } }, "node_modules/@vscode/extension-telemetry": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@vscode/extension-telemetry/-/extension-telemetry-1.4.0.tgz", - "integrity": "sha512-mqypuqIDn+vQnaQ8tMdvCRn9BprZTH2j6nlFFv9hE6hB25n32F8rOZinos8OgblRi87X1qdBpjpb0Em1LGSG9w==", + "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", @@ -3576,9 +3704,9 @@ } }, "node_modules/dayjs": { - "version": "1.11.18", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.18.tgz", - "integrity": "sha512-zFBQ7WFRvVRhKcWoUh+ZA1g2HVgUbsZm9sbddh8EC5iv93sui8DVVz1Npvz+r6meo9VKfa8NyLWBsQK1VvIKPA==", + "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": { @@ -6865,9 +6993,9 @@ } }, "node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "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" @@ -7852,6 +7980,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": "5.0.1", "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.0.1.tgz", @@ -8204,6 +8341,15 @@ "engines": { "node": "^12.20.0 || >=14" } + }, + "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 2aedf0b03..46a32939f 100644 --- a/package.json +++ b/package.json @@ -338,8 +338,8 @@ "icon": "$(chat-sparkle)" }, { - "command": "azureResourceGroups.reRunWithCopilot", - "title": "%azureResourceGroups.reRunWithCopilot%", + "command": "azureResourceGroups.rerunAzureActivityWithCopilot", + "title": "%azureResourceGroups.rerunAzureActivityWithCopilot%", "category": "Azure", "icon": "$(refresh)" }, @@ -632,7 +632,7 @@ "group": "inline" }, { - "command": "azureResourceGroups.reRunWithCopilot", + "command": "azureResourceGroups.rerunAzureActivityWithCopilot", "when": "view == azureActivityLog && viewItem =~ /activityItem/i", "group": "inline" } @@ -691,7 +691,7 @@ "when": "never" }, { - "command": "azureResourceGroups.reRunWithCopilot", + "command": "azureResourceGroups.rerunAzureActivityWithCopilot", "when": "never" } ], @@ -938,7 +938,7 @@ "@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0", "@microsoft/vscode-azext-azureauth": "^5.1.1", "@microsoft/vscode-azext-azureutils": "^4.0.0", - "@microsoft/vscode-azext-utils": "^4.0.3", + "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.4.tgz", "form-data": "^4.0.4", "fs-extra": "^11.3.0", "jsonc-parser": "^2.2.1", diff --git a/package.nls.json b/package.nls.json index 9ec32e60d..baae28f73 100644 --- a/package.nls.json +++ b/package.nls.json @@ -56,7 +56,7 @@ "Do not translate '@azure'; it is syntax for addressing the Azure agent." ] }, - "azureResourceGroups.reRunWithCopilot": "Rerun Command with Copilot...", + "azureResourceGroups.rerunAzureActivityWithCopilot": "Rerun Command with Copilot...", "walkthrough.askAzure.description": { "message": "Enter @azure in the GitHub Copilot Chat to start a conversation.\n @azure can help with learning about Azure, deploying resources, troubleshooting web app problems, querying Azure costs and more without having to switch to the Azure Portal.\n[Chat with @azure](command:azureResourceGroups.askAzure?%5B%22What%20kinds%20of%20things%20can%20you%20help%20me%20with?%22%5D)", "comment": [ diff --git a/src/commands/registerCommands.ts b/src/commands/registerCommands.ts index 924004ee9..55b64c22a 100644 --- a/src/commands/registerCommands.ts +++ b/src/commands/registerCommands.ts @@ -10,7 +10,7 @@ import { askAgentAboutActivityLog } from '../chat/askAgentAboutActivityLog/askAg import { askAgentAboutResource } from '../chat/askAgentAboutResource'; import { askAzureInCommandPalette } from '../chat/askAzure'; import { uploadFileToCloudShell } from '../cloudConsole/uploadFileToCloudShell'; -import { reRunWithCopilot } from '../copilot/reRunWithCopilot'; +import { rerunAzureActivityWithCopilot } from '../copilot/rerunAzureActivityWithCopilot'; import { ext } from '../extensionVariables'; import { TargetServiceRoleAssignmentItem } from '../managedIdentity/TargetServiceRoleAssignmentItem'; import { BranchDataItemWrapper } from '../tree/BranchDataItemWrapper'; @@ -135,7 +135,7 @@ export function registerCommands(): void { registerCommand("azureResourceGroups.askAgentAboutActivityLog", async (context: IActionContext, _node: ActivityItem) => await askAgentAboutActivityLog(context)); registerCommandWithTreeNodeUnwrapping("azureResourceGroups.askAgentAboutActivityLogItem", askAgentAboutActivityLog); registerCommandWithTreeNodeUnwrapping<{ id?: string }>("azureResourceGroups.askAgentAboutResource", (context, node) => askAgentAboutResource(context, node)); - registerCommand('azureResourceGroups.reRunWithCopilot', async (context: IActionContext, item: ActivityItem) => await reRunWithCopilot(context, item)); + registerCommand('azureResourceGroups.rerunAzureActivityWithCopilot', async (context: IActionContext, item: ActivityItem) => await rerunAzureActivityWithCopilot(context, item)); } async function handleAzExtTreeItemRefresh(context: IActionContext, node?: ResourceGroupsItem): Promise { diff --git a/src/copilot/reRunWithCopilot.ts b/src/copilot/rerunAzureActivityWithCopilot.ts similarity index 72% rename from src/copilot/reRunWithCopilot.ts rename to src/copilot/rerunAzureActivityWithCopilot.ts index cd8786d96..3d8f97f20 100644 --- a/src/copilot/reRunWithCopilot.ts +++ b/src/copilot/rerunAzureActivityWithCopilot.ts @@ -3,38 +3,37 @@ * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CopilotUserInput, createSubscriptionContext, executeCommandWithAddedContext, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { createSubscriptionContext, executeCommandWithAddedContext, markAsCopilotUserInput, type IActionContext } from "@microsoft/vscode-azext-utils"; import * as vscode from "vscode"; +import { AzureSubscription } from "../../api/src/index"; import { ActivitySelectedCache } from "../chat/askAgentAboutActivityLog/ActivitySelectedCache"; import { convertActivityTreeToSimpleObjectArray, ConvertedActivityItem } from "../chat/tools/GetAzureActivityLog/convertActivityTree"; import { GetAzureActivityLogContext } from "../chat/tools/GetAzureActivityLog/GetAzureActivityLogContext"; import { ActivityItem } from "../tree/activityLog/ActivityItem"; -export async function reRunWithCopilot(context: IActionContext, item: ActivityItem): Promise { +export async function rerunAzureActivityWithCopilot(context: IActionContext, item: ActivityItem): Promise { const activitySelectedCache = ActivitySelectedCache.getInstance(); activitySelectedCache.addActivity(item.id); const activityContext: GetAzureActivityLogContext = { ...context, activitySelectedCache: activitySelectedCache - } + }; const activityItems: ConvertedActivityItem[] = await convertActivityTreeToSimpleObjectArray(activityContext); - context.ui = new CopilotUserInput(vscode, JSON.stringify(activityItems)); + markAsCopilotUserInput(context, JSON.stringify(activityItems)); - // if subscription exists then add it to the context and - let wizardContext = context - const subscription = activityItems[0].activityAttributes?.subscription + let wizardContext = context as IActionContext & { azureSubscription?: AzureSubscription }; + const subscription = activityItems[0].activityAttributes?.subscription; if (subscription) { const subscriptionContext = createSubscriptionContext(subscription); - wizardContext = { ...context, ...subscriptionContext }; + wizardContext = { ...context, ...subscriptionContext, azureSubscription: subscription }; } // An item will always be passed in so we will only need to look at the first item in the array const callbackId = activityItems[0]?.callbackId; if (callbackId) { - // todo: change this as the subscription may not always be the third thing passed in - await executeCommandWithAddedContext(callbackId, wizardContext, undefined, undefined, subscription) + await executeCommandWithAddedContext(callbackId, wizardContext); } else { throw new Error(vscode.l10n.t('Failed to rerun with Copilot. Activity item callback ID not found.')); } From 4a614e201b9130c59a1e3687abedf9bc0d58359b Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Wed, 1 Apr 2026 10:08:27 -0700 Subject: [PATCH 5/6] changes --- package-lock.json | 180 ++++++++++++------- package.json | 3 +- src/copilot/rerunAzureActivityWithCopilot.ts | 3 +- 3 files changed, 120 insertions(+), 66 deletions(-) diff --git a/package-lock.json b/package-lock.json index 589a507e3..88e7d2b6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,9 +11,10 @@ "dependencies": { "@azure/arm-resources": "^5.2.0", "@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0", + "@github/copilot-sdk": "*", "@microsoft/vscode-azext-azureauth": "^6.0.0-alpha.3", "@microsoft/vscode-azext-azureutils": "^4.0.0", - "@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", "form-data": "^4.0.4", "fs-extra": "^11.3.0", "jsonc-parser": "^2.2.1", @@ -386,10 +387,17 @@ "node": ">=20.0.0" } }, - "node_modules/@azure/identity/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "node_modules/@azure/identity/node_modules/@azure/abort-controller": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", + "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } }, "node_modules/@azure/logger": { "version": "1.3.0", @@ -407,8 +415,7 @@ "node_modules/@azure/ms-rest-azure-env": { "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==", - "peer": true + "integrity": "sha512-dG76W7ElfLi+fbTjnZVGj+M9e0BIEJmRxU6fHaUQ12bZBe8EJKYb2GV50YWNaP2uJiVQ5+7nXEVj1VN1UQtaEw==" }, "node_modules/@azure/msal-browser": { "version": "4.28.1", @@ -1124,26 +1131,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.14", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.14.tgz", + "integrity": "sha512-VFyMwZKmeMiTFiP/6z+ZBnLVgRWl5cDAt9BWouMz7Zfh5RqQJg4ynD1vWJzKgo08u/oYf9UoF1xqFKnHmedA9A==", "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.14", + "@github/copilot-darwin-x64": "1.0.14", + "@github/copilot-linux-arm64": "1.0.14", + "@github/copilot-linux-x64": "1.0.14", + "@github/copilot-win32-arm64": "1.0.14", + "@github/copilot-win32-x64": "1.0.14" } }, "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.14", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.14.tgz", + "integrity": "sha512-z6ml4dRdghcE7RIVI8wiyes9QJ4mgkcIP22w0TAPlMp0qWmR4hQDu2LKTdmArfOjt0+0reLHIBd06zx7zuUFVA==", "cpu": [ "arm64" ], @@ -1157,9 +1164,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.14", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.14.tgz", + "integrity": "sha512-Sp5KPhiUGa0+LlF/ol7uEbqcmeTClWUAqBJ0vyO5o4Ef+fIguP+090vUYayuQ7nPQmvA/FxvguUiy5ISVlqCKg==", "cpu": [ "x64" ], @@ -1173,9 +1180,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.14", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.14.tgz", + "integrity": "sha512-0TpiN0nANHpEi+F8E7b0ArMe5+Yjqdnx+mJAWCwXyYkbgQ5lHFlo/uhTanXH+L+6b45X3XLhiGVv4WCx1Mi56g==", "cpu": [ "arm64" ], @@ -1189,9 +1196,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.14", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.14.tgz", + "integrity": "sha512-OWpP9EiDok06yobb71hJs79f5UKkgG/8fP0vHHfjyfMcMdrDxeRWwrT8A40GXVVgk1UX0li73LAAfqzfoE/z8w==", "cpu": [ "x64" ], @@ -1205,23 +1212,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.14", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.14.tgz", + "integrity": "sha512-KFZoV80Q4EDxWZo+Wlr+2lsas9wIrSK51PRW1ZImimDFP2OB7/F0dPz5BJWyscrMkg1mIonL1gKGksdGC2ZfwQ==", "cpu": [ "arm64" ], @@ -1235,9 +1242,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.14", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.14.tgz", + "integrity": "sha512-SstVxnGBZBf0coA1jkT4inFMKPpKXbUxFeQ0Aj/6bEOUndk02xsiM/etUoD53+XFT9zVua/dTvxf0Xl6QvNAFw==", "cpu": [ "x64" ], @@ -1673,24 +1680,30 @@ } }, "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.6", + "resolved": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.6.tgz", + "integrity": "sha512-hOkD3N5ucISLEo5YHAX6AxwJgTfw3JgD9EBEElRTwhA0UmXG2Ike7xcV52qQDRGf+16H3ue7m7vdZ1QvQklCEw==", "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", + "@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", + "semver": "^7.7.4", "vscode-tas-client": "^0.1.84" }, "engines": { "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": { @@ -1705,6 +1718,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", @@ -2249,7 +2299,6 @@ "integrity": "sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~6.21.0" } @@ -2342,7 +2391,6 @@ "integrity": "sha512-BtE0k6cjwjLZoZixN0t5AKP0kSzlGu7FctRXYuPAm//aaiZhmfq1JwdYpYr1brzEspYyFeF+8XF5j2VK6oalrA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.54.0", "@typescript-eslint/types": "8.54.0", @@ -2543,9 +2591,9 @@ } }, "node_modules/@vscode/extension-telemetry": { - "version": "0.9.9", - "resolved": "https://registry.npmjs.org/@vscode/extension-telemetry/-/extension-telemetry-0.9.9.tgz", - "integrity": "sha512-WG/H+H/JRMPnpbXMufXgXlaeJwKszXfAanOERV/nkXBbYyNw0KR84JjUjSg+TgkzYEF/ttRoHTP6fFZWkXdoDQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@vscode/extension-telemetry/-/extension-telemetry-1.5.1.tgz", + "integrity": "sha512-rnRRQIRCwRdbcQ0QV5ajKJRz8noEIoQA2hX9VjAlVAVB85+ClbaPNhljobFXgW31ue69FRO6KPE4XJ/lLgKt/Q==", "license": "MIT", "dependencies": { "@microsoft/1ds-core-js": "^4.3.10", @@ -2932,7 +2980,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -3369,7 +3416,6 @@ "integrity": "sha512-p4Z49OGG5W/WBCPSS/dH3jQ73kD6tiMmUM+bckNK6Jr5JHMG3k9bg/BvKR8lKmtVBKmOiuVaV2ws8s9oSbwysg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=18" } @@ -4129,7 +4175,6 @@ "dev": true, "hasInstallScript": true, "license": "MIT", - "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -4248,7 +4293,6 @@ "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -7786,6 +7830,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", @@ -7800,10 +7853,10 @@ } }, "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "peer": true + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/tsx": { "version": "4.21.0", @@ -7893,7 +7946,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index a6311d815..3edcb4a5b 100644 --- a/package.json +++ b/package.json @@ -941,9 +941,10 @@ "dependencies": { "@azure/arm-resources": "^5.2.0", "@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0", + "@github/copilot-sdk": "*", "@microsoft/vscode-azext-azureauth": "^6.0.0-alpha.3", "@microsoft/vscode-azext-azureutils": "^4.0.0", - "@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", "form-data": "^4.0.4", "fs-extra": "^11.3.0", "jsonc-parser": "^2.2.1", diff --git a/src/copilot/rerunAzureActivityWithCopilot.ts b/src/copilot/rerunAzureActivityWithCopilot.ts index 825d8ce7f..61e1f75b8 100644 --- a/src/copilot/rerunAzureActivityWithCopilot.ts +++ b/src/copilot/rerunAzureActivityWithCopilot.ts @@ -3,7 +3,8 @@ * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createSubscriptionContext, executeCommandWithAddedContext, markAsCopilotUserInput, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { createSubscriptionContext, executeCommandWithAddedContext, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { markAsCopilotUserInput } from "@microsoft/vscode-azext-utils/copilot"; import * as vscode from "vscode"; import { AzureSubscription } from "../../api/src/index"; import { ActivitySelectedCache } from "../chat/askAgentAboutActivityLog/ActivitySelectedCache"; From 615a0f82a0e22bc5c8ed4bef936a71243556e67b Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Thu, 2 Apr 2026 10:48:10 -0700 Subject: [PATCH 6/6] 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 88e7d2b6c..fb50ff8ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@github/copilot-sdk": "*", "@microsoft/vscode-azext-azureauth": "^6.0.0-alpha.3", "@microsoft/vscode-azext-azureutils": "^4.0.0", - "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.6.tgz", + "@microsoft/vscode-azext-utils": "^4.0.7", "form-data": "^4.0.4", "fs-extra": "^11.3.0", "jsonc-parser": "^2.2.1", @@ -1680,9 +1680,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 3edcb4a5b..c3a225981 100644 --- a/package.json +++ b/package.json @@ -944,7 +944,7 @@ "@github/copilot-sdk": "*", "@microsoft/vscode-azext-azureauth": "^6.0.0-alpha.3", "@microsoft/vscode-azext-azureutils": "^4.0.0", - "@microsoft/vscode-azext-utils": "file:../vscode-azuretools/utils/microsoft-vscode-azext-utils-4.0.6.tgz", + "@microsoft/vscode-azext-utils": "^4.0.7", "form-data": "^4.0.4", "fs-extra": "^11.3.0", "jsonc-parser": "^2.2.1",