Skip to content

Adopt chat sessions controller API for copilot cli #288457

@mjbvz

Description

@mjbvz

We're replacing the chat sessions provider based API with a new controller based API (see ChatSessionItemController in src/extension/vscode.proposed.chatSessionsProvider.d.ts)

This API moves to a managed object model instead of a provider based model. This should be easier to work with and also let us expose new API functionality, such as callbacks when a chat session item is archived

General migration guide:

  • Instead of calling registerChatSessionItemProvider, create a controller with createChatSessionItemController

  • provideChatSessionItems becomes essentially the refreshHandler. Instead of returning the items, you should update controller.items

  • Whenever you create a chat session item, use createChatSessionItem. This makes sure the item is managed. You can set properties directly on it to update the item

Let me know if you run into any bugs or have any questions about using the new API!

Metadata

Metadata

Labels

copilot-cli-agentBackground Agent related features/bugsdebtCode quality issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions