chat: preserve pasted attachments in side chats - #330542
Merged
Connor Peet (connor4312) merged 5 commits intoAug 13, 2026
Merged
Conversation
Carry explicit composer attachments into side chats and store pasted text as session-backed files. - Forward attached context through silent slash commands and side-chat request orchestration. - Snapshot pasted text as .txt resources before reducing Agent Host state. - Allow chats to read attachments owned by their Agent Host session without another prompt. - Cover MIME lookup, attachment forwarding, materialization, and permission boundaries. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Preserves composer attachments when creating side chats and stores pasted text as session-backed resources.
Changes:
- Forwards side-chat attachment context through slash-command orchestration.
- Materializes pasted text as
.txtsession attachments. - Adds attachment permission-boundary and MIME tests.
Show a summary per file
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/test/browser/chatWidgetSlashCommand.test.ts |
Tests slash-command attachment forwarding. |
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts |
Tests embedded paste conversion. |
src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts |
Passes context to silent slash commands. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts |
Embeds pasted text as resources. |
src/vs/sessions/SESSIONS.md |
Documents side-chat attachment behavior. |
src/vs/sessions/contrib/chat/test/browser/btwSlashCommandContribution.test.ts |
Tests /btw context forwarding. |
src/vs/sessions/contrib/chat/browser/sideChatProvider.contribution.ts |
Adopts request-options orchestration. |
src/vs/sessions/contrib/chat/browser/sideChatOrchestration.ts |
Forwards complete request options. |
src/vs/sessions/contrib/chat/browser/responseSelectionSideChatController.ts |
Adopts updated helper API. |
src/vs/sessions/contrib/chat/browser/btwSlashCommand.contribution.ts |
Sends attachments into side chats. |
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts |
Tests session attachment permissions. |
src/vs/platform/agentHost/test/node/agentService.test.ts |
Tests text materialization and state rewriting. |
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts |
Shares attachment access across peer chats. |
src/vs/platform/agentHost/node/agentService.ts |
Uses session-scoped attachment storage. |
src/vs/platform/agentHost/common/sessionDataService.ts |
Updates attachment documentation. |
src/vs/base/test/common/mime.test.ts |
Tests plain-text extension lookup. |
src/vs/base/common/mime.ts |
Supports text MIME extensions. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 17/17 changed files
- Comments generated: 2
- Review effort level: Balanced
Tighten side chat attachment handling after review and CI feedback. - Forward only explicit composer attachments through concurrent slash commands. - Keep draft paste attachments in their compatible semantic representation. - Share session attachment path checks between Copilot and Claude permission handling. - Add Claude access coverage and restore the remote draft clear regression. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Tyler James Leonhardt (@TylerLeonhardt)Matched files:
|
Move session attachment read approval into the shared permission manager. - Resolve the owning session from each exact chat channel. - Auto-approve only files contained by that session's attachment directory. - Remove duplicate Copilot and Claude provider checks. - Cover peer-chat access and cross-session denial in the central permission suite. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
roblourens
previously approved these changes
Aug 12, 2026
Resolve the session permission test imports while retaining upstream edit-rule coverage and the owning-session attachment boundary test. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
roblourens
approved these changes
Aug 12, 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.
chat: preserve pasted attachments in side chats
Carry explicit composer attachments into side chats and store pasted text as session-backed files.
(Commit message generated by Copilot)
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com