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
@mjbvz mjbvz marked this pull request as ready for review January 12, 2026 23:40
@mjbvz mjbvz requested review from bpasero and joshspicer January 12, 2026 23:40
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 12, 2026
Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

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

I have no objections going with this API considering we have a similar one that seems finalised. But I am also not deep into providing sessions via API, so I would yield to @joshspicer and maybe @DonJayamanne and @osortega for final approval.

@mjbvz mjbvz enabled auto-merge January 13, 2026 21:15
@DonJayamanne
Copy link
Contributor

I'll try this out later today.

@mjbvz mjbvz merged commit b39ecc3 into main Jan 13, 2026
22 checks passed
@mjbvz mjbvz deleted the dev/mjbvz/chat-session-item-controller branch January 13, 2026 23:35
alexr00 added a commit that referenced this pull request Jan 14, 2026
…ion-item-controller"

This reverts commit b39ecc3, reversing
changes made to 45aced5.
alexr00 added a commit that referenced this pull request Jan 14, 2026
* Revert "Merge pull request #287668 from mjbvz/dev/mjbvz/eventual-sparrow"

This reverts commit 81f7af4, reversing
changes made to 85a14f9.

* Revert "Merge pull request #286642 from microsoft/dev/mjbvz/chat-session-item-controller"

This reverts commit b39ecc3, reversing
changes made to 45aced5.
eli-w-king pushed a commit that referenced this pull request Jan 14, 2026
…-controller

Explore a controller based chat session item API
eli-w-king pushed a commit that referenced this pull request Jan 14, 2026
* Revert "Merge pull request #287668 from mjbvz/dev/mjbvz/eventual-sparrow"

This reverts commit 81f7af4, reversing
changes made to 85a14f9.

* Revert "Merge pull request #286642 from microsoft/dev/mjbvz/chat-session-item-controller"

This reverts commit b39ecc3, reversing
changes made to 45aced5.
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.

4 participants