Conversation
Co-authored-by: Copilot <copilot@github.com>
Contributor
Screenshot ChangesBase: Changed (5) |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates workspace/session pickers and storage so that “recent folders” can be shared across apps (e.g. VS Code and the Agents/Sessions app) and displayed with richer metadata (grouping + secondary text).
Changes:
- Persist “recently opened” history in application-shared storage to enable cross-app sharing.
- Extend session workspace metadata (description + group) and surface VS Code recents in the sessions workspace picker.
- Update the action widget list/dropdown UI to support a dedicated
detailsecond line, inline descriptions, and group-title display.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.ts | Switch picker secondary text from description to detail. |
| src/vs/sessions/services/sessions/common/sessionsProvider.ts | Allow resolveWorkspace to return undefined when URI can’t be handled. |
| src/vs/sessions/services/sessions/common/session.ts | Add optional description and group to ISessionWorkspace. |
| src/vs/sessions/contrib/remoteAgentHost/test/browser/remoteAgentHostSessionsProvider.test.ts | Stub ILabelService and adjust assertions for optional workspace resolution. |
| src/vs/sessions/contrib/remoteAgentHost/browser/remoteAgentHostSessionsProvider.ts | Add workspace description/group and return undefined for unsupported schemes. |
| src/vs/sessions/contrib/copilotChatSessions/test/browser/copilotChatSessionsProvider.test.ts | Stub ILabelService and adjust assertions for optional workspace resolution. |
| src/vs/sessions/contrib/copilotChatSessions/browser/permissionPicker.ts | Use detail for subtext; remove descriptionBelow list option. |
| src/vs/sessions/contrib/copilotChatSessions/browser/copilotChatSessionsProvider.ts | Add workspace description/group derived from URI; make resolveWorkspace scheme-aware. |
| src/vs/sessions/contrib/copilotChatSessions/browser/claudePermissionModePicker.ts | Use detail and updated list options. |
| src/vs/sessions/contrib/chat/test/browser/sessionWorkspacePicker.test.ts | Stub new services and handle optional resolveWorkspace. |
| src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts | Merge VS Code “recent folders” into sessions recents; add grouping and inline description list options. |
| src/vs/sessions/contrib/chat/browser/scopedWorkspacePicker.ts | Display workspace descriptions in the scoped picker. |
| src/vs/sessions/contrib/changes/browser/changesView.ts | Switch picker secondary text to detail; update list options usage. |
| src/vs/sessions/contrib/agentHost/test/browser/localAgentHostSessionsProvider.test.ts | Stub ILabelService and adjust assertions for optional workspace resolution. |
| src/vs/sessions/contrib/agentHost/browser/localAgentHostSessionsProvider.ts | Add workspace description/group and return undefined for unsupported schemes. |
| src/vs/sessions/contrib/agentHost/browser/baseAgentHostSessionsProvider.ts | Make resolveWorkspace optional and guard create flow when it returns undefined. |
| src/vs/sessions/common/agentHostSessionWorkspace.ts | Plumb optional workspace description through builder options. |
| src/vs/platform/workspaces/electron-main/workspacesHistoryMainService.ts | Store/load recents from APPLICATION_SHARED scope for cross-app sharing. |
| src/vs/platform/storage/electron-main/storageMainService.ts | Broaden application storage main service APIs to accept APPLICATION_SHARED. |
| src/vs/platform/actionWidget/browser/actionWidgetDropdown.ts | Forward new detail field into action list items. |
| src/vs/platform/actionWidget/browser/actionWidget.css | Add styling for detail, inline description mode, and group-title display. |
| src/vs/platform/actionWidget/browser/actionList.ts | Add detail, group-title rendering logic, updated list options, and accessibility label composition. |
Copilot's findings
Comments suppressed due to low confidence (3)
src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts:927
URI.revivedoes no validation and the recent-workspace entries come from profile storage. Please useURI.from(stored.uri, true)(and handle invalid components) when buildingownUristo avoid accepting malformed/untrusted URI components from storage.
// Collect URIs already in sessions history to avoid duplicates
const ownRecents = this._getStoredRecentWorkspaces();
const ownUris = new Set(ownRecents.map(r => URI.revive(r.uri).toString()));
src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts:883
removeRecentlyOpenedreturns a promise; calling it withoutawait/voidmeans rejections can become unhandled. Pleaseawaitit or explicitlyvoid ...catch(...)depending on whether failures should be surfaced.
protected _removeVSCodeRecentWorkspace(selection: IWorkspaceSelection): void {
const uri = selection.workspace.repositories[0]?.uri;
if (!uri) {
return;
}
this.workspacesService.removeRecentlyOpened([uri]);
src/vs/platform/workspaces/electron-main/workspacesHistoryMainService.ts:259
- Switching the MRU storage from
StorageScope.APPLICATIONtoAPPLICATION_SHAREDwill cause existing users’ recents (stored underAPPLICATION) to appear empty after upgrade. Consider migrating: if shared is empty but application has data, read from the old scope once and store it intoAPPLICATION_SHARED(and/or fall back to the old scope for reads).
// First try with storage service
const storedRecentlyOpenedRaw = this.applicationStorageMainService.get(WorkspacesHistoryMainService.RECENTLY_OPENED_STORAGE_KEY, StorageScope.APPLICATION_SHARED);
if (typeof storedRecentlyOpenedRaw === 'string') {
try {
storedRecentlyOpened = JSON.parse(storedRecentlyOpenedRaw);
} catch (error) {
- Files reviewed: 22/22 changed files
- Comments generated: 3
roblourens
approved these changes
Apr 22, 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.
Co-authored-by: Copilot copilot@github.com