-
Notifications
You must be signed in to change notification settings - Fork 268
AZD VS Code Extension Updates & Improvements #6425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add new Extensions view with tree data provider for managing azd extensions - Implement extension commands: install, uninstall, and upgrade - Add ExtensionProvider service for interacting with azd extension APIs - Add environment variables tree node for displaying env vars in workspace - Enhance environment tree views with toggle visibility and .env file viewing - Add inline actions to environment view (view .env, select environment) - Add navigation buttons to view titles (new environment, install extension) - Improve tree view type checking with isTreeViewModel utility - Update telemetry IDs for new extension and environment operations - Refactor command handlers to support both workspace and environment tree views
…g Posts - Rename 'Resources' link to 'AZD Blog Posts' in Help and Feedback view - Update URL to point to Azure SDK blog filtered by azure-developer-cli tag - Update command title to 'Open AZD Blog Posts'
- Added new command to open Azure resources directly in the Azure Portal - Created OpenInPortalStep wizard step to handle portal URL opening - Enhanced RevealStep with improved resource tree navigation and error handling - Added debug logging throughout wizard steps for better diagnostics - Improved error handling in PickResourceStep and PickResourceGroupStep - Updated command registration and package.json with new command - Added localized command title in package.nls.json - Modified reveal.ts to support both TreeViewModel and direct service item inputs - Enhanced RevealStep to activate required Azure extensions and refresh tree before reveal - Added fallback mechanisms when automatic reveal fails (copy ID, open in portal options)
…ents view - Extended environment commands to support both workspace and standalone views - Added refresh functionality to Environments view after environment operations - Connected env-refresh, env-edit, env-delete, and revealResourceGroup commands to standalone environments - Updated reveal.ts to handle EnvironmentTreeItem for resource group navigation - Modified env.ts to accept EnvironmentTreeItem in all environment operations - Added view refresh commands after env operations (delete, new, select, refresh) - Removed automatic env-select on click for non-default environments - Fixed ESLint warnings with naming-convention for Azure provider types - Added comment explaining focusGroup limitation in RevealStep - Improved regex patterns in RevealStep for better linting compliance This unifies the experience across both the workspace environments and the standalone environments view, ensuring users can perform the same operations from either location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This WIP PR introduces significant improvements to the Azure Developer CLI VS Code extension, adding a new dedicated activity bar view with multiple panels for managing environments, extensions, and resources. The changes focus on providing a standalone interface for environment management and adding convenient navigation features to Azure Portal.
Key Changes:
- Adds a new activity bar container with four views: My Project, Environments, Extensions, and Help and Feedback
- Implements environment variable visibility toggle functionality with hidden-by-default behavior
- Adds "Show in Azure Portal" command for quick navigation from services
- Extends reveal commands to work with both workspace and standalone environment views
Reviewed changes
Copilot reviewed 35 out of 38 changed files in this pull request and generated 20 comments.
Show a summary per file
| File | Description |
|---|---|
package-lock.json |
Empty lock file added at repository root (should be removed) |
ext/vscode/ext/vscode/package-lock.json |
Empty lock file in duplicate nested path (should be removed) |
ext/vscode/package-lock.json |
Lock file dependency updates (peer dependencies unmarked) |
.vscode/settings.json |
Added aspire settings (unrelated to PR scope) |
ext/vscode/package.json |
Registered new views container, views, commands, and menus for enhanced UI |
ext/vscode/package.nls.json |
Added localization for new "Show in Azure Portal" command |
ext/vscode/src/extension.ts |
Integrated new view registration in activation |
ext/vscode/src/views/registerViews.ts |
New file registering all tree data providers and view commands |
ext/vscode/src/views/myProject/MyProjectTreeDataProvider.ts |
New provider for My Project view without environments |
ext/vscode/src/views/environments/EnvironmentsTreeDataProvider.ts |
New standalone environments view with variable visibility toggle |
ext/vscode/src/views/extensions/ExtensionsTreeDataProvider.ts |
New extensions management view |
ext/vscode/src/views/helpAndFeedback/HelpAndFeedbackTreeDataProvider.ts |
New help and feedback view with links |
ext/vscode/src/views/workspace/AzureDevCliApplication.ts |
Added environment variables provider and optional environment inclusion |
ext/vscode/src/views/workspace/AzureDevCliEnvironment.ts |
Enhanced with collapsible environment variables child node |
ext/vscode/src/views/workspace/AzureDevCliEnvironments.ts |
Added env values provider integration |
ext/vscode/src/views/workspace/AzureDevCliEnvironmentVariables.ts |
New classes for environment variable tree items with visibility toggle |
ext/vscode/src/views/workspace/AzureDevCliWorkspaceResourceBranchDataProvider.ts |
Added visibility state management |
ext/vscode/src/services/AzureDevEnvValuesProvider.ts |
New service to fetch environment variable values via CLI |
ext/vscode/src/services/AzureDevExtensionProvider.ts |
New service to list installed azd extensions |
ext/vscode/src/commands/registerCommands.ts |
Registered new extension management and portal navigation commands |
ext/vscode/src/commands/extensions.ts |
New command implementations for extension install/uninstall/upgrade |
ext/vscode/src/commands/env.ts |
Extended environment commands to support standalone view items |
ext/vscode/src/commands/azureWorkspace/reveal.ts |
Extended reveal commands with EnvironmentTreeItem support and portal navigation |
ext/vscode/src/commands/azureWorkspace/wizard/OpenInPortalStep.ts |
New wizard step for opening resources in Azure Portal |
ext/vscode/src/commands/azureWorkspace/wizard/RevealStep.ts |
Enhanced with extension activation, retry logic, and better error handling |
ext/vscode/src/commands/azureWorkspace/wizard/PickEnvironmentStep.ts |
Added debug logging |
ext/vscode/src/commands/azureWorkspace/wizard/PickResourceStep.ts |
Added error handling and debug logging |
ext/vscode/src/commands/azureWorkspace/wizard/PickResourceGroupStep.ts |
Added error handling and improved error messages |
ext/vscode/src/commands/up.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/commands/down.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/commands/deploy.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/commands/provision.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/commands/restore.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/commands/packageCli.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/commands/pipeline.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/commands/monitor.ts |
Added support for AzureDevCliModel type guard |
ext/vscode/src/utils/isTreeViewModel.ts |
Added isAzureDevCliModel type guard function |
ext/vscode/src/telemetry/telemetryId.ts |
Added telemetry IDs for extension management commands |
Files not reviewed (2)
- ext/vscode/ext/vscode/package-lock.json: Language not supported
- ext/vscode/package-lock.json: Language not supported
| "viewsContainers": { | ||
| "activitybar": [ | ||
| { | ||
| "id": "azure-dev-view", | ||
| "title": "Azure Developer CLI", | ||
| "icon": "resources/icon.png" | ||
| } | ||
| ] |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR adds a new activity bar view container for Azure Developer CLI. This is a significant UX change that should be mentioned prominently in the PR description and potentially requires user approval, as it will add a new icon to all VS Code users' activity bars when the extension is installed. Consider whether this should be configurable or if users can hide it if they prefer the existing workspace integration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot is this still relevant, if so implement the suggestion
| private async getEnvironments(context: IActionContext): Promise<EnvironmentTreeItem[]> { | ||
| const applications = await this.applicationProvider.getApplications(); | ||
| if (applications.length === 0) { | ||
| return []; | ||
| } | ||
|
|
||
| // Assuming single project for now as per requirement | ||
| const app = applications[0]; | ||
| const envs = await this.envListProvider.getEnvListResults(context, app.configurationPath); |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Environments view currently only supports a single project (line 119-120), but the PR description states it provides "a unified interface for managing all azd environments across projects". This is a significant limitation that should either be: 1) Fixed to support multiple projects as described, or 2) Clearly documented in the PR description that multi-project support is not yet implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot update the PR description to accurately reflect the fact we support a single project.
ext/vscode/src/commands/azureWorkspace/wizard/PickResourceStep.ts
Outdated
Show resolved
Hide resolved
| } catch (error) { | ||
| // Fallback or handle error if json output is not supported or command fails | ||
| // For now, assuming JSON output is supported in recent azd versions | ||
| console.error('Failed to get env values', error); |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Console.error statement used for debugging should be replaced with proper logging using ext.outputChannel.appendLog to ensure consistency with the extension's logging infrastructure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
ext/vscode/src/views/environments/EnvironmentsTreeDataProvider.ts
Outdated
Show resolved
Hide resolved
ext/vscode/src/views/environments/EnvironmentsTreeDataProvider.ts
Outdated
Show resolved
Hide resolved
Added unit tests for: - OpenInPortalStep: Tests portal URL construction for various Azure resource types * Web Apps, Storage Accounts, Cosmos DB, Container Apps, Resource Groups * Error handling for missing resource IDs * Priority configuration - RevealStep: Tests Azure resource reveal functionality * Extension activation for different Azure providers * Resource group pre-expansion logic * Multi-attempt reveal with fallback * Error handling and user notifications * Tree refresh mechanisms - EnvironmentsTreeDataProvider: Tests standalone environments view * Environment listing and hierarchy * Default environment marking * Environment variable visibility toggling * Tree refresh events * Integration with environment providers - ExtensionsTreeDataProvider: Tests extensions management view * Extension listing and display * Version information * Tree item creation * Refresh functionality All tests use proper mocking with sinon, follow established patterns, and provide comprehensive coverage of success and error paths.
- Add sinon and @types/sinon for test mocking - Remove unused telemetryId parameter from registerActivityCommand - Add documentation for telemetry tracking in commands - Fix isAzdCommand to handle undefined input - Add TEST_COVERAGE.md documentation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Implements comprehensive language support for azure.yaml configuration files: - Auto-completion for host types, lifecycle hooks, and properties with snippets - Hover documentation with examples and Microsoft Learn links - Quick fixes for missing folders, properties, and invalid configurations - Add new service refactoring with interactive wizard - Enhanced validation diagnostics Includes 28 new test cases (all passing) covering completion, hover, code actions, and diagnostics. Updated README.md, FEATURE_IDEAS.md, and cspell dictionary.
Implements comprehensive language support for azure.yaml configuration files: - Auto-completion for host types, lifecycle hooks, and properties with snippets - Hover documentation with examples and Microsoft Learn links - Quick fixes for missing folders, properties, and invalid configurations - Add new service refactoring with interactive wizard - Enhanced validation diagnostics Includes 28 new test cases (all passing) covering completion, hover, code actions, and diagnostics. Updated README.md, FEATURE_IDEAS.md, and cspell dictionary.
… and initialization Add a new Template Tools view panel that helps users discover and initialize Azure Developer CLI templates: Features: - Dynamic Quick Start section (visible only when no azure.yaml exists) - Initialize from existing code - Create minimal project - Browse template gallery - Browse templates by 6 predefined categories (AI/ML, Web Apps, APIs, Containers, Databases, Starters) - AI Templates section with direct access to aka.ms/aiapps templates - Search functionality with QuickPick UI for filtering templates - Template items with inline actions: - Click template name to view README - Hover actions: Initialize (rocket icon), View on GitHub (github icon) - Context menu with all actions Implementation: - AzureDevTemplateProvider service for fetching/caching templates from awesome-azd JSON feed (1-hour cache) - TemplateToolsTreeDataProvider with FileSystemWatcher for azure.yaml changes - Template comm Add a new Template Tools view panel that helps users discover and initialize Azure Developer CLI temp) - Features: - Dynamic Quick Start section (visible only when no azure.yaml exists) - Initialize ft test coverage (11 n - Initialize from existing code - Create minined between Environmen - Create minimal projecs and seamlessly integrates with exi- Browse temit workflows.
VSCode Extension Installation Instructions
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 61 out of 64 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- ext/vscode/package-lock.json: Language not supported
| } catch (error) { | ||
| // Fallback or handle error if json output is not supported or command fails | ||
| // For now, assuming JSON output is supported in recent azd versions | ||
| console.error('Failed to get env values', error); |
Copilot
AI
Dec 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using console.error for logging is not consistent with the extension's logging patterns. The Azure Developer CLI extension uses ext.outputChannel for logging. Consider using ext.outputChannel.appendLog() instead for consistency with the rest of the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Introduces significant improvements to the Azure Developer CLI VS Code extension, focusing on enhanced environment management, improved resource navigation, and better user experience.
📋 Summary of Changes
🆕 New Features
1. Standalone Environments View
2. Extensions Management View
3. "Show in Azure Portal" Command
4. Enhanced Environment Operations
env-refresh,env-edit,env-delete,revealAzureResourceGroup🔧 Improvements
Resource Navigation
revealAzureResourceGroupto support standalone environmentsUser Experience
Code Quality
EnvironmentTreeItemsupport📊 Commits Included
bec9154f- Remove Environments from My Project view89d29243- Add extensions view and enhanced environment managementab57695c- Update Help and Feedback link from Resources to AZD Blog Posts15197c3d- Add 'Show in Azure Portal' command for servicesa9f3d191- Integrate environment commands with standalone Environments view🧪 Testing Checklist
🔍 Related Issues
<- Improved regex patterns in RevealStep for better linting compliance Link any related issues here -->
📝 Notes
This is a work in progress. Additional testing and refinement may be needed before final review.