-
Notifications
You must be signed in to change notification settings - Fork 47
Add focusResourceGroup to api #1330
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
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 PR adds a new focusResourceGroup API function that allows external extensions to programmatically focus on a resource group in the Focused Resources view by providing its resource group ID. The implementation adds backward compatibility by extending the existing focusGroup command to accept either a GroupingItem (existing behavior) or a string resource group ID (new behavior).
- Adds
focusResourceGroup(resourceGroupId: string)to the public API - Extends the
focusGroupcommand to accept both GroupingItem and string ID parameters - Includes comprehensive test coverage for both the command and API functionality
Reviewed changes
Copilot reviewed 13 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| api/src/resources/resourcesApi.ts | Adds the focusResourceGroup method signature to the public API |
| api/package.json | Bumps API version from 3.0.0 to 3.1.0 (minor version for new feature) |
| api/package-lock.json | Updates lockfile with new version and @types/node upgrade to 22.x |
| api/docs/vscode-azureresources-api.d.ts | Regenerated TypeScript definitions including the new API method |
| api/CHANGELOG.md | Documents the new focusResourceGroup API function |
| src/api/createAzureResourcesHostApi.ts | Implements focusResourceGroup by delegating to the focusGroup command |
| src/api/createWrappedAzureResourcesExtensionApi.ts | Wraps focusResourceGroup with telemetry |
| src/commands/focus/focusGroup.ts | Extends focusGroup to accept string resource group IDs with validation |
| src/commands/focus/testFocusResourceGroup.ts | Adds manual test command for developers to test the new functionality |
| src/commands/registerCommands.ts | Registers the testFocusResourceGroup command |
| src/extension.ts | Exposes getFocusedGroup in test API |
| src/testApi.ts | Adds getFocusedGroup method to test API interface |
| package.json | Registers the testFocusResourceGroup command |
| package-lock.json | Updates lockfile (incidental peer dependency changes) |
| test/focusGroup.test.ts | Tests command-level functionality with backward compatibility and new string ID behavior |
| test/api/focusResourceGroup.test.ts | Tests API-level functionality including multiple focus changes and case handling |
Files not reviewed (1)
- api/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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 14 out of 17 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- api/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This is ready for review |
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.
Can you remove the test code? Otherwise looks good.
|
@copilot remove the test commands |
|
@alexweininger I've opened a new pull request, #1335, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * Remove test command for focusResourceGroup Co-authored-by: alexweininger <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: alexweininger <[email protected]>
Implements #1327
There's a test command in there that will be removed before merging