Skip to content

Reduce IChatSessionsService interface size#300587

Merged
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/ill-herring
Mar 10, 2026
Merged

Reduce IChatSessionsService interface size#300587
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/ill-herring

Conversation

@mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Mar 10, 2026

Trying to clean up this service interface by having everything go through the contributions instead off having separate getters for each value

Make everything go through the contributions instead off having separate getters for each value
Copilot AI review requested due to automatic review settings March 10, 2026 23:20
@vs-code-engineering vs-code-engineering bot added this to the 1.112.0 milestone Mar 10, 2026
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 reduces the surface area of IChatSessionsService by removing per-field getters (icon/welcome/placeholder) and routing consumers through resolved chat session contributions instead.

Changes:

  • Introduces ResolvedChatSessionsExtensionPoint and updates IChatSessionsService APIs to return resolved contributions (including a resolved icon).
  • Refactors ChatSessionsService to resolve contribution icons (ThemeIcon or theme-specific URI) on demand, and removes the old per-session-type caches/getters.
  • Updates UI/action consumers to read icon, welcome fields, and placeholder directly from the resolved contribution.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/vs/workbench/contrib/chat/test/common/mockChatSessionsService.ts Updates mock service to return resolved contributions (needs icon parsing aligned with production).
src/vs/workbench/contrib/chat/common/chatSessionsService.ts Adds ResolvedChatSessionsExtensionPoint and shrinks IChatSessionsService interface.
src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.ts Adjusts agent lock call to use sessionType.
src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput.ts Uses contribution’s resolved icon instead of removed icon getter.
src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts Reads welcome/title/message/placeholder from resolved contribution instead of removed getters.
src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.ts Implements resolved contribution/icon logic and removes cached per-type getter maps.
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.ts Updates contribution map typing to the resolved contribution type.
src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.ts Updates action plumbing to accept the resolved contribution type.

@mjbvz mjbvz enabled auto-merge March 10, 2026 23:50
@mjbvz mjbvz merged commit 84d9d33 into microsoft:main Mar 10, 2026
22 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