Skip to content

Separate implementation of Copilot CLI, controller vs old API#4635

Merged
DonJayamanne merged 2 commits intomainfrom
don/unchanged-marsupial
Mar 24, 2026
Merged

Separate implementation of Copilot CLI, controller vs old API#4635
DonJayamanne merged 2 commits intomainfrom
don/unchanged-marsupial

Conversation

@DonJayamanne
Copy link
Collaborator

No description provided.

@DonJayamanne DonJayamanne self-assigned this Mar 24, 2026
@DonJayamanne DonJayamanne requested a review from Copilot March 24, 2026 09:34
@DonJayamanne DonJayamanne marked this pull request as ready for review March 24, 2026 09:35
@DonJayamanne DonJayamanne marked this pull request as draft March 24, 2026 09:35
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 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 ChatSessionItemController feature-flagged implementation and related “new session id” tracking.
  • Introduce ICopilotCLIChatSessionItemProvider and update ChatSessionRepositoryTracker to depend on the interface instead of the concrete provider.
  • Restructure ChatSessionsContrib initialization 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

  • refreshSession ignores refreshOptions (and doesn’t distinguish update vs delete). At minimum, mark the parameter as intentionally unused (e.g., _refreshOptions) to satisfy unused-parameter checks; ideally handle reason:'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();
	}

@DonJayamanne DonJayamanne marked this pull request as ready for review March 24, 2026 09:40
@DonJayamanne DonJayamanne enabled auto-merge March 24, 2026 09:41
@DonJayamanne DonJayamanne added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit 1383b23 Mar 24, 2026
23 checks passed
@DonJayamanne DonJayamanne deleted the don/unchanged-marsupial branch March 24, 2026 09:58
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.

3 participants