feat: add getWorkingDirectory method to agent host session providers and related services for distiguishing local from user customizations + several bug fixes#319047
Merged
Conversation
…and related services for distiguishing local from user customizations + several bug fixes
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds working-directory awareness to agent-host customization services so directory-discovered customizations can be categorized as workspace-local or user-level, while also adjusting customization sync behavior.
Changes:
- Adds
getWorkingDirectory(...)through agent-host provider and customization service interfaces. - Uses working-directory information when building AI customization items from directory customizations.
- Removes user storage from local customization auto-sync and updates related test stubs.
Show a summary per file
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.ts |
Removes user prompt storage from syncable customization sources. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.ts |
Adds working-directory lookup to the workbench customization service contract and implementation. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.ts |
Classifies directory customization children as local or user based on session working directory. |
src/vs/sessions/services/agentHost/browser/agentHostCustomizationService.ts |
Refactors session/provider lookup, adds working-directory delegation, and wires customization change events. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteAgentHostCustomizationHarness.test.ts |
Updates the test customization service stub for the new interface method. |
src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts |
Exposes the session working directory from cached session state. |
src/vs/sessions/common/agentHostSessionsProvider.ts |
Extends agent-host session providers with getWorkingDirectory. |
Copilot's findings
- Files reviewed: 7/7 changed files
- Comments generated: 2
Comment on lines
+96
to
+102
| this._providerListeners.set(provider, provider.onDidChangeCustomAgents(() => { | ||
| this._onDidChangeCustomAgents.fire(); | ||
| })); | ||
|
|
||
| this._providerListeners.set(provider, provider.onDidChangeCustomizations(() => { | ||
| this._onDidChangeCustomizations.fire(); | ||
| })); |
| for (const sessionCustomization of directoryCustomizations) { | ||
| const source = AICustomizationSources.local; // TODO | ||
| const groupKey = undefined; //sessionCustomization.clientId ? REMOTE_CLIENT_GROUP : REMOTE_HOST_GROUP; | ||
| const source = workingDirectory && sessionCustomization.uri.startsWith(workingDirectory) ? AICustomizationSources.local : AICustomizationSources.user; |
roblourens
approved these changes
May 29, 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.
No description provided.