-
Notifications
You must be signed in to change notification settings - Fork 37.2k
sessions: make 'apply changes' show in working set multidiff #281644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…COL_ERROR (#281444) * chore: update build * chore: bump distro
* agent sessions - add and use `getSession` * agent sessions - fix `changes` serialisation * agent sessions - have a dedicated `agentSessionsList.background` color * agent sessions - update session title based on viewer state * style - update icons and adjust sidebar widths * refactor - simplify chat editor retrieval logic * style - add archived state styling to session items * chore - add group to menu for agent session actions * fix - adjust auxiliary bar maximization behavior * fixes #281448 * feat - add new actions for agent sessions viewer * Add new codicons: collectionSmall, vmSmall, and cloudSmall * fix cyclic * style - remove unused background color from `agentSessionsList` * refactor - simplify session serialization logic * style - correct label text for session viewer link * fix broken status update --------- Co-authored-by: João Moreno <joaomoreno@users.noreply.github.com> Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
…ress Various fixes for session progress
<!-- Thank you for submitting a Pull Request. Please: * Read our Pull Request guidelines: https://github.com/microsoft/vscode/wiki/How-to-Contribute#pull-requests * Associate an issue with the Pull Request. * Ensure that the code is up-to-date with the `main` branch. * Include a description of the proposed changes and how to test them. -->
…281637) * edits: fix files created from background agents showing 0/0 in diff Our baseline lookup logic was aware of 'create' operations to show them at the right time, but if a created file was edited, we would incorrectly add a baseline for it anyway which caused issues. * trigger PR workflow on sessions branch
Pull request was closed
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @bpaseroMatched files:
@jriekenMatched files:
|
There was a problem hiding this 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 enables displaying an "Apply Changes" button as a floating overlay in the multi-diff editor when viewing chat/agent session changes. It introduces a new menu contribution point (MultiDiffEditorContent) and refactors agent session lookup to use a centralized getSession() helper method instead of direct array searches.
Key Changes:
- Adds floating menu overlay support to multi-diff editor for prominent action buttons
- Refactors agent session lookup pattern from array searches to
getSession(resource)method - Enhances agent sessions UI with expanded/collapsed states and new toolbar actions
Reviewed changes
Copilot reviewed 44 out of 45 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/vs/workbench/services/actions/common/menusExtensionPoint.ts |
Adds new multiDiffEditor/content API menu extension point |
src/vs/platform/actions/common/actions.ts |
Registers MultiDiffEditorContent MenuId |
src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditor.ts |
Implements floating menu overlay for multi-diff editor with resource context |
src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidget.ts |
Exposes root element, context key service, and scoped instantiation service |
src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.ts |
Implements public accessors for root element and services |
src/vs/editor/browser/widget/multiDiffEditor/style.css |
Adds styling for floating menu overlay button |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.ts |
Updates ViewAllSessionChangesAction to accept URI parameter and set multiDiffSourceUri |
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.ts |
Adds getSession() method to service interface |
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.ts |
Implements getSession() lookup and fixes session caching serialization |
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.ts |
Updates to use getSession() and implements IAgentSessionsControl interface |
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.ts |
Defines IAgentSessionsControl interface |
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.ts |
Adds refresh/find toolbar actions and improves width calculations |
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.ts |
Registers new toolbar actions and fixes icon assignments |
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.ts |
Shows archived state styling and uses new session icon |
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.ts |
Removes allowFiltering option (now always enabled) |
src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css |
Adds archived session styling |
src/vs/workbench/contrib/chat/browser/chatViewPane.ts |
Implements expanded/collapsed context key and toolbar context |
src/vs/workbench/contrib/chat/browser/chatWidget.ts |
Refactors to use getSession() method |
src/vs/workbench/contrib/chat/browser/chatInputPart.ts |
Refactors to use getSession() method |
src/vs/workbench/contrib/chat/browser/chatWidgetService.ts |
Improves chat editor finding logic with typed group references |
src/vs/workbench/contrib/chat/browser/chatSessions.contribution.ts |
Adds "Thinking..." description and uses generatedTitle for tool invocations |
src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.ts |
Optimizes status bar updates to only refresh when session count changes |
src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.ts |
Simplifies dashboard rendering logic |
src/vs/workbench/contrib/chat/common/chatContextKeys.ts |
Adds agentSessionsViewerExpanded context key |
src/vs/workbench/contrib/chat/browser/media/chatViewPane.css |
Adds borders and min-width for proper layout |
src/vs/workbench/contrib/chat/browser/media/chatViewTitleControl.css |
Adds min-width and reformats comment |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.ts |
Extends hasFileBaseline() to check for create operations |
src/vs/workbench/contrib/chat/test/browser/chatEditingCheckpointTimeline.test.ts |
Adds tests for create operation baseline detection |
src/vs/workbench/contrib/inlineChat/test/browser/inlineChatController.test.ts |
Adds getSession() to mock agent sessions model |
src/vs/workbench/browser/layout.ts |
Moves setViewVisible() calls before composite hide/show operations |
src/vs/editor/common/viewLayout/viewLineRenderer.ts |
Removes dir="auto" attribute from RTL text rendering |
src/vs/editor/test/common/viewLayout/__snapshots__/*.html |
Updates test snapshots for RTL rendering changes |
src/vs/base/common/codiconsLibrary.ts |
Adds small icon variants for collection, vm, and cloud |
build/lib/stylelint/vscode-known-variables.json |
Adds editor line highlight and reorders comment variables |
package.json, .npmrc |
Updates distro and build IDs |
.github/workflows/*.yml |
Adds 1.107/sessions branch to CI workflows |
| this.rebuild(); | ||
| })); | ||
|
|
||
| this._register(resourceContextKey); |
Copilot
AI
Dec 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resourceContextKey is already registered in the parent MultiDiffEditor class (line 89). Registering it again here in MultiDiffEditorContentMenuOverlay will cause it to be disposed twice, which could lead to errors. Remove this redundant registration since the lifecycle of the ResourceContextKey is already managed by the parent class.
| this._sessionResourceContextKey?.set(input.resource); | ||
| this._contentOverlay?.updateResource(input.resource); |
Copilot
AI
Dec 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resource context key is being set twice: once at line 102 and again at line 241 inside updateResource() which is called at line 103. This is redundant. Consider removing the set() call from updateResource() method since the caller already sets the context key before calling updateResource(), or remove line 102 and only rely on updateResource() to set it.
Closes #281641