vscode-azureresourcegroups icon indicating copy to clipboard operation
vscode-azureresourcegroups copied to clipboard

Add extension link to empty resource type groups

Open Copilot opened this issue 3 months ago • 3 comments

When viewing resources grouped by type, empty groups (e.g., Azure AI Foundry with no resources) now display a clickable item to open the corresponding extension or its view.

Implementation

  • GroupingItem: Added getGenericItemsForEmptyGroup() virtual method, called when resources.length === 0
  • ResourceTypeGroupingItem: Overrides to return "Open in {Extension} Extension" item with special handling for AI Foundry
  • AzExtWrapper: Added supportsResourceType() to match resource types to extensions

Behavior

Empty resource type groups are now expandable and show:

For AI Foundry (when extension is installed):

📁 Azure AI Foundry
  └─ 🔗 Open in AI Foundry Extension

Clicking opens the microsoft-foundry-resources view in the AI Foundry extension.

For other extensions (when not installed):

📁 {Resource Type}
  └─ 📦 Open in {Extension Name} Extension

Clicking opens the extension's marketplace page. Applies to all resource types with uninstalled extensions automatically.

[!WARNING]

Original prompt

This section details on the original issue you should resolve

<filter_complete></filter_complete>

<issue_title>Add link to AI Foundry extension from Azure resources view</issue_title> <issue_description>When there are no foundry resources, it would be nice to show a link over to the extension. Something like this:

That, a context menu, or both to give some kind of hint of what to do.</issue_description>

<agent_instructions>Add a standardized way of adding generic tree items underneath resource type tree items when there are no child resources for that resource type.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@nturinski @alexweininger is on the case.
  • Fixes microsoft/vscode-azureresourcegroups#1290
Original prompt

This section details on the original issue you should resolve

<issue_title>Add link to AI Foundry extension from Azure resources view</issue_title> <issue_description>When there are no foundry resources, it would be nice to show a link over to the extension. Something like this:

Image

That, a context menu, or both to give some kind of hint of what to do.</issue_description>

<agent_instructions>Add a standardized way of adding generic tree items underneath resource type tree items when there are no child resources for that resource type.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@nturinski @alexweininger is on the case.
  • Fixes microsoft/vscode-azureresourcegroups#1290

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot avatar Nov 20 '25 18:11 Copilot

@copilot the tree item underneath the Foundry resource type should open the microsoft-foundry-resources view from the Foundry extension when clicked.

The view id is microsoft-foundry-resources

and the view container is microsoft-foundry

alexweininger avatar Nov 20 '25 19:11 alexweininger

@copilot the tree item underneath the Foundry resource type should open the microsoft-foundry-resources view from the Foundry extension when clicked.

The view id is microsoft-foundry-resources...

Updated in commit 0053c53. The tree item now uses the microsoft-foundry-resources.focus command to open the Foundry view when the AI Foundry extension is installed and there are no Foundry resources.

Copilot avatar Nov 20 '25 19:11 Copilot

Logic Apps - no logic apps on this subscription, and I don't have it installed Foundry - no foundry projects, but I do have it installed image

So two new tree items, one for under Resource Types when there are no resources and the associated extension isn't installed.

And one that is for ONLY under the Foundry resource type, when there are no foundry resource and the foundry extension is installed.

@fiveisprime looking for feedback on wording and looks of these. I think there's plenty of room to expand on this too. Since I'd like to add tree items under Resource Type items for when you do have the extension installed but no resources. We can guide user to create a resource. I don't like expanding tree items and having nothing come up, sometimes that feels like things are broken. I'd rather have a nice empty state

alexweininger avatar Nov 20 '25 20:11 alexweininger