Skip to content

feat: add "Ask @azure" context menu action for AKS clusters (#2183)#2184

Open
Tatsinnit wants to merge 1 commit into
Azure:mainfrom
Tatsinnit:fix/ask-azure-command
Open

feat: add "Ask @azure" context menu action for AKS clusters (#2183)#2184
Tatsinnit wants to merge 1 commit into
Azure:mainfrom
Tatsinnit:fix/ask-azure-command

Conversation

@Tatsinnit
Copy link
Copy Markdown
Member

Add "Ask @Azure" context menu action for AKS clusters

Fixes #2183

Summary

Adds a new "Ask @Azure" context menu item to AKS clusters in the Cloud Explorer tree view. When clicked, it opens GitHub Copilot Chat with a pre-populated query containing the cluster name and ARM resource ID, targeting the @azure chat participant.

Changes

  • New command aks.askAzureCopilot — resolves the selected cluster node and opens Copilot Chat via workbench.action.chat.open
  • Menu visibility — item only appears when github.copilot-chat.activated is true
  • Tree item ID fix — uses ARM resource ID (clusterResource.id) instead of name + resourceGroup for consistency

Files Changed

File Change
package.json Command + menu contribution registration
package.nls.json Localization string
extension.ts Command registration
aksAskAzureCopilot.ts Command implementation (new)
aksClusterTreeItem.ts Tree item ID fix

Testing

  1. Install the extension with GitHub Copilot Chat active
  2. Right-click an AKS cluster in Cloud Explorer
  3. Verify "Ask @Azure" appears in the context menu
  4. Click it — Copilot Chat opens with: @azure I'd like to talk about my <cluster-name> Azure Kubernetes Service cluster (resource ID: <arm-id>).

- Add aks.askAzureCopilot command that opens GitHub Copilot Chat with
  cluster name and ARM resource ID pre-populated for @Azure participant
- Show menu item when github.copilot-chat.activated is true
- Fix cluster tree item ID to use ARM resource ID for consistency

Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
@Tatsinnit Tatsinnit requested a review from Copilot May 30, 2026 21:09
@Tatsinnit Tatsinnit self-assigned this May 30, 2026
@Tatsinnit Tatsinnit requested a review from tejhan May 30, 2026 21:10
} else {
this.subscriptionTreeNode = parent.subscriptionTreeNode;
}
this.id = `${this.clusterResource.name} ${clusterResource.resourceGroup}`;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ 💡Gentle fyi and hunch: This needs reference check here, @tejhan could be the best one as we want to avoid and reciprocal effect. Thanks

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new "Ask @Azure" context menu entry on AKS cluster nodes in the Cloud Explorer that opens GitHub Copilot Chat pre-populated with a query targeting the @azure participant and including the cluster name and ARM resource ID. Also switches the AKS cluster tree item id from name + resourceGroup to the ARM resource ID for consistency.

Changes:

  • New aks.askAzureCopilot command implementation, registration, and context-menu contribution (gated by github.copilot-chat.activated).
  • Localization entry for "Ask @Azure".
  • AksClusterTreeItem.id now uses clusterResource.id (ARM resource ID).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/commands/aksAskAzureCopilot/aksAskAzureCopilot.ts New command that resolves the cluster tree node and opens Copilot Chat with a prefilled @azure query.
src/extension.ts Imports and registers the new aks.askAzureCopilot command via telemetry helper.
src/tree/aksClusterTreeItem.ts Changes tree item id to use the ARM resource ID instead of name + resourceGroup.
package.json Declares the new command, hides it from the command palette, and adds it to the cluster view context menu when Copilot Chat is activated.
package.nls.json Adds the "Ask @Azure" localization string.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Tatsinnit Tatsinnit added bug Something isn't working enhancement 🚀 New feature or request or improvements on existing code. labels May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement 🚀 New feature or request or improvements on existing code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add 'Ask @azure' context menu action to open GitHub Copilot Chat with AKS cluster context

2 participants