Skip to content

Conversation

@mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Jan 9, 2026

For #276243

Explores moving the chat session item api to use a controller instead of a provider. This uses managed objects and is based on the TestController we already have finalized

Main flow :

  • Extensions call createChatSessionItemController('my.sessionId') to create the controller. The controller is a managed object with a dispose method

  • VS Code then calls refreshHandler on the controller to build up the initial list

  • During refresh, the extension updates the ChatSessionItemCollection managed object. This object is basically just a managed array. This lets the editor see changes that are made to the session list

A few other points:

  • Chat session items would now also be managed objects. Extensions could set properties to update them in the UI

  • If an extension needs to update the list of chat session items independently of VS Code — for example if a new session is created through GitHub.com — it would simply update the ChatSessionItemCollection

  • We would have event handlers for when the editor archives or disposes of a chat session item

Still some open questions but seems promising. Also although the general API shape looks pretty different , the logic shouldn't be that different for extensions

Copilot AI review requested due to automatic review settings January 9, 2026 00:18
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.

Copilot wasn't able to review any files in this pull request.

@mjbvz mjbvz force-pushed the dev/mjbvz/chat-session-item-controller branch from 442306f to e337681 Compare January 9, 2026 00:22
For #276243

Explores moving the chat session item api to use a controller instead of a provider
@mjbvz mjbvz force-pushed the dev/mjbvz/chat-session-item-controller branch from e337681 to 3f197a6 Compare January 9, 2026 00:24
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