Skip to content

Agents - start cleaning up IChatSessionFileChange and IChatSessionFileChange2#311688

Merged
lszomoru merged 5 commits intomainfrom
lszomoru/extensive-firefly
Apr 21, 2026
Merged

Agents - start cleaning up IChatSessionFileChange and IChatSessionFileChange2#311688
lszomoru merged 5 commits intomainfrom
lszomoru/extensive-firefly

Conversation

@lszomoru
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 21, 2026 14:35
@lszomoru lszomoru self-assigned this Apr 21, 2026
@lszomoru lszomoru enabled auto-merge (squash) April 21, 2026 14:35
@lszomoru lszomoru requested a review from sandy081 April 21, 2026 14:35
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Screenshot Changes

Base: 4e26289a Current: 0095cf4e

Changed (2)

chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Light
Before After
before after
editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after

Copy link
Copy Markdown
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 starts consolidating the Agents window “session changes” typing by introducing a sessions-layer alias that can represent both legacy IChatSessionFileChange and newer IChatSessionFileChange2, then updating session-facing interfaces/adapters to use that alias.

Changes:

  • Add ISessionFileChange (union of IChatSessionFileChange | IChatSessionFileChange2) and update IChat/ISession to expose changes as ISessionFileChange[].
  • Update ICopilotChatSession and AgentSessionAdapter to surface changes as ISessionFileChange[].
Show a summary per file
File Description
src/vs/sessions/services/sessions/common/session.ts Introduces ISessionFileChange and updates session/chat interfaces to use it for changes.
src/vs/sessions/contrib/copilotChatSessions/browser/copilotChatSessionsProvider.ts Moves session provider-facing changes typing toward ISessionFileChange[] and widens AgentSessionAdapter extraction accordingly.

Copilot's findings

Comments suppressed due to low confidence (1)

src/vs/sessions/contrib/copilotChatSessions/browser/copilotChatSessionsProvider.ts:183

  • CopilotCLISession now declares _changes/changes as ISessionFileChange[], but the constructor still initializes _changes with observableValue<readonly IChatSessionFileChange[]>(..., []) (later in the class). Because observableValue’s return type is invariant (it has a set method), this will not type-check. Initialize _changes with ISessionFileChange[] (or remove the explicit generic and let it infer from the _changes declaration) so the types match end-to-end.
	private readonly _changes: ReturnType<typeof observableValue<readonly ISessionFileChange[]>>;
	readonly changes: IObservable<readonly ISessionFileChange[]>;
  • Files reviewed: 9/9 changed files
  • Comments generated: 1

@lszomoru lszomoru merged commit ad714f0 into main Apr 21, 2026
26 checks passed
@lszomoru lszomoru deleted the lszomoru/extensive-firefly branch April 21, 2026 15:43
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 21, 2026
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