Skip to content

Don't return providers in IChatSessionsService methods#292646

Merged
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/junior-hedgehog
Feb 3, 2026
Merged

Don't return providers in IChatSessionsService methods#292646
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/junior-hedgehog

Conversation

@mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Feb 3, 2026

Further trying to clean up interface so that IChatSessionsService consumers don't know about providers directly

Further trying to clean up interface so that `IChatSessionsService` consumers don't know about providers directly
Copilot AI review requested due to automatic review settings February 3, 2026 19:29
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 3, 2026
@mjbvz mjbvz enabled auto-merge February 3, 2026 19:36
Copy link
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

This PR cleans up the IChatSessionsService interface by changing activateChatSessionItemProvider to no longer expose providers directly to consumers. The method's return type is changed from Promise<IChatSessionItemProvider | undefined> to Promise<void>.

Changes:

  • Modified the IChatSessionsService interface to change activateChatSessionItemProvider return type to Promise<void>
  • Created a new private doActivateChatSessionItemProvider method that returns the provider for internal use
  • Updated the mock implementation to match the new interface signature

Reviewed changes

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

File Description
src/vs/workbench/contrib/chat/common/chatSessionsService.ts Updated interface signature for activateChatSessionItemProvider to return Promise<void>
src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.ts Introduced private doActivateChatSessionItemProvider method for internal use and updated the public method to delegate without returning the provider
src/vs/workbench/contrib/chat/test/common/mockChatSessionsService.ts Updated mock implementation to match new interface signature with noop implementation

@mjbvz mjbvz merged commit bc109e5 into microsoft:main Feb 3, 2026
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants