Skip to content

Try fixing chat session content being retained#309993

Merged
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/minimum-baboon
Apr 14, 2026
Merged

Try fixing chat session content being retained#309993
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/minimum-baboon

Conversation

@mjbvz
Copy link
Copy Markdown
Collaborator

@mjbvz mjbvz commented Apr 14, 2026

We only want to retain this while the session is ongoing or it's open in a panel/editor. The panel case wdidn't seem to be handling this

We only want to retain this while the session is ongoing or it's open in a panel/editor. The panel case wdidn't seem to be handling this
Copilot AI review requested due to automatic review settings April 14, 2026 21:34
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

Note

Copilot was unable to run its full agentic suite in this review.

This PR aims to prevent chat session content from being retained longer than necessary by ensuring contributed “untitled” sessions are properly committed to a real resource and by updating the view pane when such a commit happens.

Changes:

  • Wrap contributed-session “commit to real resource” logic in sendRequest and add cleanup via a disposable model reference.
  • Emit a “session committed” event during the untitled-to-real session transition.
  • Update ChatViewPane to react to committed sessions by reloading and showing the committed model.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts Introduces a commit flow for untitled contributed sessions and attempts to dispose the temporary model reference to avoid retention.
src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.ts Listens for session-commit events and swaps the pane’s model to the committed session resource.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 3

Comment thread src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts
Comment thread src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts
@mjbvz mjbvz merged commit 812d224 into microsoft:main Apr 14, 2026
30 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.117.0 milestone Apr 14, 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