Skip to content

agentHost: allow inherited peer chats to move workspaces - #341317

Merged
Sandeep Somavarapu (sandy081) merged 2 commits into
mainfrom
sandy081/agents/fix-this-when-a-peer-chat-with-no
Oct 13, 2026
Merged

Sandeep Somavarapu (sandy081) merged 2 commits into
mainfrom
sandy081/agents/fix-this-when-a-peer-chat-with-no

Conversation

@sandy081

Copy link
Copy Markdown
Member

What changed

  • Allow peer chats without individual workingDirectories to select a workspace when they inherit a multi-root session workspace.
  • Preserve the inherited directory set during conversion validation.
  • Attach the requested folder to the session before moving the peer chat through the provider.
  • Keep bare worktree isolation restricted for inherited multi-root chats.

Why

Previously, workspace conversion required the chat effective workspace to contain exactly one directory. Peer chats inheriting a multi-root session therefore received This chat's workspace cannot be changed. even though the provider supports per-chat working directories.

Validation

  • npm run compile — passed
  • npm run hygiene — passed
  • ./scripts/test.sh --run src/vs/platform/agentHost/test/node/sessionWorkspaceConversion.test.ts — 114 passing
  • npm run typecheck-client — passed
  • npm run eslint -- src/vs/platform/agentHost/node/chatContributions/sessionWorkspaceConversion/sessionWorkspaceConversionService.ts src/vs/platform/agentHost/test/node/sessionWorkspaceConversion.test.ts — passed
  • git diff --check — passed

Permit peer chats that inherit a multi-root session workspace to select an individual workspace. Preserve the inherited roots during conversion so the requested folder is attached to the session before provider mutation.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 15:47
@sandy081 Sandeep Somavarapu (sandy081) added this to the 1.143.0 milestone Oct 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Copilot still rejects workspace changes for the newly eligible multi-root peer chats.

1 open finding
What changed in this PR

Allows inherited peer chats in multi-root sessions to select a workspace.

Changes:

  • Expands workspace-conversion eligibility for inherited multi-root peers.
  • Preserves inherited directories during validation.
  • Adds coverage for attaching and assigning the selected folder.
File Description
sessionWorkspaceConversionService.ts Enables and validates inherited multi-root conversion.
sessionWorkspaceConversion.test.ts Tests the new conversion flow.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Allow exact peer-chat workspace changes to replace inherited multi-root state while preserving the existing guard for session-wide replacements.

Co-authored-by: Copilot <[email protected]>
@sandy081
Sandeep Somavarapu (sandy081) merged commit bb8c361 into main Oct 13, 2026
55 of 56 checks passed
@sandy081
Sandeep Somavarapu (sandy081) deleted the sandy081/agents/fix-this-when-a-peer-chat-with-no branch October 13, 2026 17:07
Don Jayamanne (DonJayamanne) added a commit that referenced this pull request Oct 13, 2026
…xploration-vscode

* origin/main: (40 commits)
  MSRC fixes (#341342)
  chat: render input attachments for the input model's session (#341350)
  chat: center subagent tool activity hooks (#341258)
  Manage Copilot plugin marketplaces through Agent Host (#341301)
  fix: linux setuid sandbox helper permissions (#341292)
  agentHost: resolve #chat chips on the host of the chat that shows them (#341332)
  [Perf] agentHost: limit archived sessions over Mission Control (#341327)
  Remember expanded state for "Other Models" in model picker (#341335)
  Offer Stop for copilot detached background shells  (#341310)
  agentHost: allow inherited peer chats to move workspaces (#341317)
  [Perf] agentHost: reduce Mission Control relay overhead (#341223)
  Fix Customizations modal spacing (#341144)
  Fix dependency cycle in QuickInputService and EditorResolverService (#341321)
  Fix Explorer refresh on restoring deleted workspace root folder (#341323)
  chat: Share and rate-limit core utility model requests (#340100)
  agentHost: open #chat chips on the connection that owns the chat (#341313)
  Fix flaky StorageMainService tests by awaiting storage warm-up (#341305)
  agentHost: record the default chat role instead of reading the default chat URI shape (#341293)
  welcome: preserve tab icon color with Modern Icons
  Fix flaky test in diskFileSystemProvider.test.ts (#341304)
  ...

# Conflicts:
#	src/vs/platform/agentHost/node/agentService.ts
#	src/vs/platform/agentHost/node/protocolServerHandler.ts
#	src/vs/platform/agentHost/test/node/protocolServerHandler.test.ts
#	src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts
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