Skip to content

Copilot AH: set the workingDirectory to SessionConfig, otherwise customization and repo detection does not work#319810

Merged
aeschli merged 1 commit into
mainfrom
aeschli/striking-xerinae-583
Jun 4, 2026
Merged

Copilot AH: set the workingDirectory to SessionConfig, otherwise customization and repo detection does not work#319810
aeschli merged 1 commit into
mainfrom
aeschli/striking-xerinae-583

Conversation

@aeschli
Copy link
Copy Markdown
Contributor

@aeschli aeschli commented Jun 3, 2026

Without the workingDirectory beeing initially set, the system prompt will claim that the folder is not a repoitory and customization detection will not be limited to the current working directory

Copilot AI review requested due to automatic review settings June 3, 2026 20:53
@aeschli aeschli enabled auto-merge (squash) June 3, 2026 20:53
@aeschli aeschli self-assigned this Jun 3, 2026
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 updates the Copilot Agent Host session wiring so the resolved session working directory is included in the Copilot SDK session config, which is necessary for correct repository detection and scoping of customization/config discovery.

Changes:

  • Pass the resolved workingDirectory into the session-config builder so it can be included in the SDK config.
  • Enable SDK config discovery and set workingDirectory on the per-session config returned from _buildSessionConfig.
  • Update both provisional materialization and resume flows to use the new _buildSessionConfig(..., workingDirectory) signature.
Show a summary per file
File Description
src/vs/platform/agentHost/node/copilot/copilotAgent.ts Threads the resolved working directory into the SDK session config (and enables config discovery) for both materialization and resume paths.

Copilot's findings

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

Comment on lines 1585 to +1587
hooks: toSdkHooks(plugins.flatMap(p => p.hooks), callbacks.hooks),
enableConfigDiscovery: true,
workingDirectory: workingDirectory?.fsPath,
Comment on lines +1586 to +1587
enableConfigDiscovery: true,
workingDirectory: workingDirectory?.fsPath,
@aeschli aeschli merged commit 320585a into main Jun 4, 2026
26 checks passed
@aeschli aeschli deleted the aeschli/striking-xerinae-583 branch June 4, 2026 06:40
@vs-code-engineering vs-code-engineering Bot added this to the 1.124.0 milestone Jun 4, 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