Separate implementation of Copilot CLI, controller vs old API#4635
Merged
DonJayamanne merged 2 commits intomainfrom Mar 24, 2026
Merged
Separate implementation of Copilot CLI, controller vs old API#4635DonJayamanne merged 2 commits intomainfrom
DonJayamanne merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the Copilot CLI chat sessions implementation to remove the ChatSessionItemController-based path and unify around the vscode.ChatSessionItemProvider flow, while also extracting a small provider interface for cross-component use.
Changes:
- Remove the
ChatSessionItemControllerfeature-flagged implementation and related “new session id” tracking. - Introduce
ICopilotCLIChatSessionItemProviderand updateChatSessionRepositoryTrackerto depend on the interface instead of the concrete provider. - Restructure
ChatSessionsContribinitialization to register Copilot CLI services via a helper and reuse the metadata store for Claude sessions.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts | Removes controller path; simplifies refresh/swap handling; updates fork flow to always find items via the provider. |
| src/extension/chatSessions/vscode-node/copilotCLIChatSessions.ts | Adds ICopilotCLIChatSessionItemProvider interface (but also contains a large commented-out prior implementation). |
| src/extension/chatSessions/vscode-node/chatSessions.ts | Refactors registration: Copilot CLI services registered via helper; Claude sessions created using returned metadata store. |
| src/extension/chatSessions/vscode-node/chatSessionRepositoryTracker.ts | Switches dependency from concrete provider to ICopilotCLIChatSessionItemProvider and relies on refreshSession. |
Comments suppressed due to low confidence (1)
src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts:212
refreshSessionignoresrefreshOptions(and doesn’t distinguish update vs delete). At minimum, mark the parameter as intentionally unused (e.g.,_refreshOptions) to satisfy unused-parameter checks; ideally handlereason:'delete'by cleaning up any per-session state and/or doing targeted refresh logic.
public async refreshSession(refreshOptions: { reason: 'update'; sessionId: string } | { reason: 'delete'; sessionId: string }): Promise<void> {
this._onDidChangeChatSessionItems.fire();
}
src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts
Show resolved
Hide resolved
src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts
Show resolved
Hide resolved
src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts
Show resolved
Hide resolved
ulugbekna
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.