Skip to content

Remove notifySessionItemsChanged#292642

Merged
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/fancy-badger
Feb 3, 2026
Merged

Remove notifySessionItemsChanged#292642
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/fancy-badger

Conversation

@mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Feb 3, 2026

afaik notifySessionItemsChanged is only used in tests and the tests it is used in seem to be testing notifySessionItemsChanged 🙃

afaik `notifySessionItemsChanged` is only used in tests and the tests it is used in seem to be testing `notifySessionItemsChanged` 🙃
Copilot AI review requested due to automatic review settings February 3, 2026 19:23
@mjbvz mjbvz enabled auto-merge February 3, 2026 19:23
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 3, 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 removes the notifySessionItemsChanged method that was only being used in tests to manually trigger the session items changed event. The method has been removed from the interface, main service implementation, and mock service, along with the tests that were specifically testing this method.

Changes:

  • Removed notifySessionItemsChanged method from IChatSessionsService interface and implementations
  • Removed two tests that were testing the removed method in localAgentSessionsProvider.test.ts
  • Changed return type of getChatSessionItems from IChatSessionItem[] to readonly IChatSessionItem[] for better immutability guarantees

Reviewed changes

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

File Description
src/vs/workbench/contrib/chat/common/chatSessionsService.ts Removed notifySessionItemsChanged from interface and changed array type to readonly in getChatSessionItems return type
src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.ts Removed notifySessionItemsChanged implementation from main service
src/vs/workbench/contrib/chat/test/common/mockChatSessionsService.ts Removed notifySessionItemsChanged implementation from mock service
src/vs/workbench/contrib/chat/test/browser/agentSessions/localAgentSessionsProvider.test.ts Removed two tests that were testing the removed method

@mjbvz mjbvz merged commit 8a88f5e 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