Remove unused hasAnySessionOptions method#304863
Conversation
There was a problem hiding this comment.
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)fromIChatSessionsService. - 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. |
| 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; |
There was a problem hiding this comment.
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.
No description provided.