* 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.
* Initial plan
* fix: accept Azure DevOps Git URLs without .git suffix in plugin marketplace
- Remove the `.git` suffix requirement from `normalizeGitRepoPath`; the function
now accepts any URL path that has at least two segments.
- Update `parseUriMarketplaceReference` to handle paths with and without `.git`:
- `cacheSegments` are built without the suffix in both cases.
- `canonicalId` is always normalized to include `.git` so that the same repo
specified with and without the suffix deduplicates correctly.
- Add a JSDoc comment on `normalizeGitRepoPath` explaining the new semantics.
- Update the test that expected HTTPS/SSH URLs without `.git` to be rejected;
these are now accepted. SCP-style (`git@host:path`) still requires `.git`.
- Add tests for Azure DevOps-style URLs and cross-suffix deduplication.
Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>
* refactor: use gitSuffix constant instead of magic number -4
Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>
* sessions - fix chat input shrinking at narrow widths (#299498)
style - set width to 100% for `interactive-input-part`
* modal - force focus into first modal editor always
* fix: update precondition for FixDiagnosticsAction and hide input widget on command execution (#299499)
fixes https://github.com/microsoft/vscode/issues/299251
* refactor: remove workspace context service dependency from FolderPicker
* Add logging for agent feedback actions
* modal - some fixes to actions and layout
* modal - surface some editor actions in a new toolbar (#299582)
* modal - surface some editor actions in a new toolbar
* ccr
* keybindings - remove "Edit as JSON" as its now available from the title menu
* settings - remove "Edit as JSON" as its now available from the title menu
* update hover fixes
* terminal fixes
* terminal improvements
* Sessions: fix auth scopes of gh FSP
* sessions customizations: make it easier to scan mcp/plugin marketplac… (#299636)
sessions customizations: make it easier to scan mcp/plugin marketplace list
* sessions: add built-in prompt files with override support (#299629)
* sessions: add built-in prompt files with override support
Ship bundled .prompt.md files with the Sessions app that appear as
slash commands out of the box. Built-in prompts use a BUILTIN_STORAGE
constant (cast as PromptsStorage) defined in the aiCustomization layer,
avoiding changes to the core PromptsStorage enum and prompt service types.
- AgenticPromptsService discovers prompts from vs/sessions/prompts/
at runtime via FileAccess and injects them into the listing pipeline
- Override logic: user/workspace prompts with matching names take
precedence over built-in ones
- Built-in prompts open as read-only in the management editor
- Sessions tree view, workspace service, and counts handle BUILTIN_STORAGE
- Add /create-pr as the first built-in prompt
- Bundle prompt files via gulpfile resource includes
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Update src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* sessions: use AICustomizationPromptsStorage type for builtin storage
Adopt the new AICustomizationPromptsStorage union type in the sessions
tree view method signature. Use string-keyed Records and targeted casts
at the PromptsStorage boundary to stay type-safe.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: remove PromptsStorage casts, widen IStorageSourceFilter
Use AICustomizationPromptsStorage in sessions-local interfaces
(IAICustomizationGroupItem, IAICustomizationFileItem) and widen
IStorageSourceFilter.sources to readonly string[] so BUILTIN_STORAGE
flows through without casts. The only remaining cast is at the
IPromptPath creation boundary in AgenticPromptsService.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: move BUILTIN_STORAGE to sessions common layer
Move AICustomizationPromptsStorage type and BUILTIN_STORAGE constant
from the workbench browser UI module to sessions/contrib/chat/common
so that AgenticPromptsService (a service) does not depend on UI code.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* sessions: fix ESLint dangerous type assertion in builtin prompts (#299663)
Replace the `as IPromptPath` cast in discoverBuiltinPrompts with a
createBuiltinPromptPath factory function that contains the type
narrowing in one place, satisfying the code-no-dangerous-type-assertions
ESLint rule.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Enhance Agent Sessions Control and Renderer with observable active session resource
* fix terminal
* Enable model management in NewChatWidget
* review feedback
* different competion settings for copilot markdown and plaintext
---------
Co-authored-by: Benjamin Pasero <benjamin.pasero@gmail.com>
Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
Co-authored-by: Johannes Rieken <johannes.rieken@gmail.com>
Co-authored-by: BeniBenj <besimmonds@microsoft.com>
Co-authored-by: Osvaldo Ortega <osortega@microsoft.com>
Co-authored-by: Josh Spicer <23246594+joshspicer@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* chat: register file system provider via workbench contribution
- Moves the registerProvider call from ChatResponseResourceFileSystemProvider constructor
to a new ChatResponseResourceWorkbenchContribution class that gets instantiated by
the workbench. This ensures the vscode-chat-response-resource:// file system provider
is registered even though the service has no other dependencies that would trigger
eager instantiation.
- Changes the singleton registration from Eager to Delayed since the workbench
contribution now depends on it, triggering instantiation.
- Fixes file system provider not being found errors (ENOPRO) when MCPs or extensions
try to access chat response resources.
Fixes#299504
(Commit message generated by Copilot)
* bump