Azure / Azure/vscode-aks-tools

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

Open
#2,183 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
65
Forks
78
Avg merge
2d 16h
Merged PRs (30d)
22

Description

## Bug / Feature Request

### Problem

Currently, there is no way to quickly ask GitHub Copilot Chat about a specific AKS cluster directly from the cluster context menu. Users who want to ask `@azure` about their cluster must manually open Copilot Chat and type out the cluster resource context themselves.

Additionally, the tree item ID for AKS clusters uses `name + resourceGroup` instead of the ARM resource ID, which can cause inconsistencies when identifying clusters programmatically.

### Expected Behavior

- A new **"Ask @azure"** context menu item should appear when right-clicking an AKS cluster in the Cloud Explorer (when GitHub Copilot Chat is activated).
- Clicking it should open GitHub Copilot Chat with a pre-populated query containing the cluster name and ARM resource ID, targeting the `@azure` participant.
- The cluster tree item ID should use the ARM resource ID for consistency.

### Proposed Solution

1. Add a new command `aks.askAzureCopilot` that:
- Resolves the selected AKS cluster node
- Opens Copilot Chat via `workbench.action.chat.open` with a pre-filled query: `@azure I'd like to talk about my Azure Kubernetes Service cluster (resource ID: ).`
2. Register the command in the context menu with visibility condition: `github.copilot-chat.activated`
3. Fix tree item ID to use `clusterResource.id` (ARM resource ID) instead of `name + resourceGroup`

### Files Affected

- `package.json` — command registration and menu contribution
- `package.nls.json` — localization string
- `src/extension.ts` — command registration
- `src/commands/aksAskAzureCopilot/aksAskAzureCopilot.ts` — new command implementation
- `src/tree/aksClusterTreeItem.ts` — tree item ID fix

### Additional Context

This integrates with the GitHub Copilot Chat `@azure` participant to provide a seamless "ask about my cluster" experience directly from the AKS extension tree view.

Contributor guide

Open the contributing guide

Research direction

Start by reading src/extension.ts and the existing command and tree-item patterns, then inspect the five files listed in the issue. Verify the command registration, context-menu visibility, Copilot Chat query, and ARM resource ID behavior against the expected behavior; done means all requested files are updated and the action works only when Copilot Chat is activated.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, github, kubernetes, typescript, vscode
Domain
cloud, devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.