Skip to content

Remove unused hasAnySessionOptions method#304863

Merged
mjbvz merged 3 commits intomicrosoft:mainfrom
mjbvz:dev/mjbvz/xenacious-roundworm
Mar 26, 2026
Merged

Remove unused hasAnySessionOptions method#304863
mjbvz merged 3 commits intomicrosoft:mainfrom
mjbvz:dev/mjbvz/xenacious-roundworm

Conversation

@mjbvz
Copy link
Copy Markdown
Collaborator

@mjbvz mjbvz commented Mar 25, 2026

No description provided.

@mjbvz mjbvz self-assigned this Mar 25, 2026
Copilot AI review requested due to automatic review settings March 25, 2026 18:49
Copy link
Copy Markdown
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 removes the hasAnySessionOptions method from the chat sessions service contract and cleans up associated test/mocking code, as part of ongoing work to reduce legacy session/lifecycle heuristics and simplify the session options surface.

Changes:

  • Removed hasAnySessionOptions(sessionResource: URI) from IChatSessionsService.
  • Removed the corresponding method from MockChatSessionsService.
  • Deleted the unit test that validated hasAnySessionOptions.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/vs/workbench/contrib/chat/test/common/mockChatSessionsService.ts Drops the mock implementation of hasAnySessionOptions.
src/vs/workbench/contrib/chat/common/chatSessionsService.ts Removes hasAnySessionOptions from the IChatSessionsService interface.
src/vs/workbench/api/test/browser/mainThreadChatSessions.test.ts Removes the unit test that exercised hasAnySessionOptions.

Comment on lines 334 to 338
canResolveChatSession(sessionType: string): Promise<boolean>;
getOrCreateChatSession(sessionResource: URI, token: CancellationToken): Promise<IChatSession>;

hasAnySessionOptions(sessionResource: URI): boolean;
getSessionOptions(sessionResource: URI): ReadonlyChatSessionOptionsMap | undefined;
getSessionOption(sessionResource: URI, optionId: string): string | IChatSessionProviderOptionItem | undefined;
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasAnySessionOptions was removed from IChatSessionsService, but ChatSessionsService still implements a public hasAnySessionOptions(...) method (see src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.ts). If the goal is to fully remove this unused API, please delete the remaining implementation as well to avoid dead code / accidental consumers relying on a method that's no longer part of the service contract.

Copilot uses AI. Check for mistakes.
@vs-code-engineering vs-code-engineering bot added this to the 1.114.0 milestone Mar 25, 2026
@mjbvz mjbvz merged commit 63e3432 into microsoft:main Mar 26, 2026
26 of 29 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.

3 participants