* fix: set isolation mode when new session is assigned
* fix: update isolation mode handling in NewChatWidget and remove unused session reference
* fix: remove unused session handling in BranchPicker and update NewChatWidget to set branch directly
* fix: update repo handling in NewChatWidget and RepoPicker to set repository URI directly
* fix: refactor repository URI handling in NewChatWidget to use a dedicated method
* fix: preserve draft state in NewChatWidget to retain picker preferences during widget recreation
* fix: enhance draft state preservation in NewChatWidget to conditionally store target and related properties
* fix: update isolation mode handling in IsolationModePicker to use current mode as fallback
* refactor: enhance actionProvider to utilize contextKeyService for session type checks
* refactor: add contextKeyService to ChatSuggestNextWidget for session type handling
* refactor: simplify actionProvider by removing contextKeyService dependency
Lazily create scoped CKS: This can be expensive and is not needed until the context menu is shown
And remove the global themeService listener. We can bring it back when the chat response is correctly fully optimized.
* Wait for chat cancellation to complete before proceeding
This is an inherent race condition in the architecture, working on changing it, in the meantime, work around this...
* Fix test
* fix: remove chat-pending-dragging class on re-render to fix opacity issue
Fixes#297473
The 'chat-pending-dragging' class (which sets opacity: 0.4) was not being
removed when elements were re-rendered. This caused messages to randomly
appear with lower opacity if they had been dragged before the list was
updated.
The fix adds 'chat-pending-dragging' to the classList.remove() call that
clears pending-related classes during re-render.
* fix: move class cleanup before pending divider rendering
Addresses review feedback: the chat-pending-dragging class was only
being removed on the normal render path. If a recycled template was
rendered as a pending divider, it would return early before the cleanup
code ran, leaving the class and opacity stuck at 0.4.
This moves the class cleanup to run before the isPendingDividerVM check,
ensuring it's always applied regardless of element type.
* chat: toggle queue/steer keybindings based on context
- Splits EditingRequestType.QueueOrSteer into Queue and Steer to track
which type of pending message is being edited
- Keybindings now respect the chat.requestQueuing.defaultAction setting:
when steer is default, Enter=Steer and Alt+Enter=Queue; when queue is
default, the bindings swap
- When editing a queued or steer message, Enter always submits with the
same type, regardless of the config setting. This ensures pressing Enter
to save an edit keeps the message in its original queue category
- Updates chatWidget to set the specific editing type based on the
pending message's kind
- Simplifies keybinding logic with effectiveDefault conditions that
account for both config and editing context
Fixes#297454
(Commit message generated by Copilot)
* pr comments
* mcp: fix concurrent request response collection race
- JsonRpcProtocol.handleMessage now returns JsonRpcMessage[] containing
responses generated by incoming requests, rather than delegating
response collection to callers via side-channel state
- McpGatewaySession simplified by removing _pendingResponses and
_isCollectingPostResponses fields, which were susceptible to racing
under concurrent HTTP POSTs. Now directly uses handleMessage's
return value for the response body
- _send callback still invoked for all messages (backward compatible
with McpServerRequestHandler and SSE notification broadcast)
- Updated tests to assert on handleMessage return values
Fixes#297780
(Commit message generated by Copilot)
* mcp: address review comments on jsonRpcProtocol changes
- Adds JSDoc to handleMessage clarifying what is returned (only responses
for incoming requests), ordering guarantees for batch inputs, and that
responses are still emitted via _send callback to avoid double-sending
- Tightens _handleRequest return type from Promise<JsonRpcMessage> to
Promise<JsonRpcResponse>, enforcing that only valid responses are
returned. Introduces JsonRpcResponse type alias for better type safety
- Expands error handling tests to assert that returned replies match
what is emitted via _send for both JsonRpcError and generic error paths
Fixes#297780
(Commit message generated by Copilot)
* refactor(AccountWidget): simplify update button logic and styling
* feat(AccountWidget): enhance update button logic for embedded app scenarios
* fix(AccountWidget): add missing line for clarity in onClick method
* embedded app update hint
* fix(AccountWidget): remove background image from update button when disabled
* Update src/vs/sessions/contrib/accountMenu/browser/media/accountWidget.css
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/vs/sessions/contrib/accountMenu/browser/account.contribution.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix(AccountWidget): refine styles for disabled update button
* Update src/vs/sessions/contrib/accountMenu/browser/account.contribution.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat(AccountWidget): embedded app update flow with dialog, close, and open VS Code
- Show outlined 'Update Available' button when updates are disabled due to embedded app
- On click, confirm dialog explains Sessions will close and VS Code will open
- Opens VS Code via productService.urlProtocol with windowId=_blank (new empty window)
- Closes Sessions window after launching VS Code
- Uses secondary outlined button style (border, no fill) for hint state
- Inject IOpenerService, IDialogService, INativeHostService
- Remove simulation TODOs, use real updateService.state
* refactor(update): detect updates in embedded app via canInstall flag
- Add optional canInstall field to AvailableForDownload state
- Darwin: embedded app runs normal init + scheduled checks via HTTP
(no Electron autoUpdater events), sets AvailableForDownload(update, false)
- Win32: embedded app skips platform setup, checks via HTTP,
sets AvailableForDownload(update, false) when update found
- Sessions UI: check canInstall === false for hint button + dialog
- Remove DisablementReason.EmbeddedApp (no longer needed)
- Non-embedded --sessions mode uses standard update flow unchanged
* fix: update AccountWidget fixture with new constructor args
* fix: use IHostService instead of INativeHostService for browser layer compliance
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
When templates are reused for different tree items, the DOM content from
pending dividers was not being cleaned up. This caused old 'Steering' or
'Queued' divider headers to persist visually even after they were no longer
in the list.
The fix checks if the previous element in a template was a pending divider,
and if so, clears the templateData.value node when the template is reused
for a new element.
- Adds a check in clearRenderedParts() to clear templateData.value when
the previous element was a pending divider
- Ensures stale divider headers don't remain visible after pending requests
are processed and removed from the queue
Fixes https://github.com/microsoft/vscode/issues/299853
(Commit message generated by Copilot)
The new esbuild-based CI pipeline (core-ci) uses curated resource
patterns in build/next/index.ts to copy non-JS assets into the bundle
output. When built-in .prompt.md files were added for the sessions
window, they were included in the legacy pipeline's
vscodeResourceIncludes (build/gulpfile.vscode.ts) but not in the
desktopResourcePatterns used by the esbuild pipeline.
This caused the prompt files to be missing from release builds
(out-vscode-min), even though they worked correctly when running
from sources (where copyAllNonTsFiles copies everything).
Add 'vs/sessions/prompts/*.prompt.md' to desktopResourcePatterns
to match the existing entry in vscodeResourceIncludes.