162072 Commits

Author SHA1 Message Date
Ladislau Szomoru
d2ba34a77c
Git - disable some functionality in the agents window (#327817) 2026-07-29 06:43:02 +00:00
Dileep Yavanmandha
c90b41e23e
Fix flaky run_in_terminal registration test (#327938) 2026-07-29 06:33:47 +00:00
samir-nimbly
e096470e5d
Fix chat image attachments silently dropped when signed out of GitHub (#323856)
* fix: send chat image attachments when signed out of GitHub

Image attachments were silently dropped for signed-out users even when a
vision-capable BYOK/local model was configured. The panel Image prompt
element gated image inclusion on
`copilotToken?.isEditorPreviewFeaturesEnabled()`, which is `undefined`
when there is no Copilot token (i.e. not signed in), so the negation
evaluated truthy and the image was omitted before the request was sent.

`isEditorPreviewFeaturesEnabled()` represents an org policy that is only
meaningful when a Copilot token exists; a missing token should not block
the feature. Default the check to enabled when the token is absent, using
the same `?? true` pattern already used in
claudeChatSessionContentProvider. This preserves the org-policy behavior
(explicit `editor_preview_features=0` still omits images) while letting
signed-out / BYOK users send images to vision-capable models.

Applied to both HistoricalImage and Image render paths, and added unit
tests covering signed-out, signed-in, org-policy-disabled, and
non-vision-model cases.

Fixes #323854

Co-authored-by: SamirSaji <samirsaji13@gmail.com>

* fix: report accurate omission reason for policy-blocked images

Address review feedback: when a vision-capable model has images omitted
because org policy disables editor preview features, the omitted-reference
status previously said the model "does not support images", which is
misleading. Set the status description based on the actual cause
(lack of vision vs. org policy). The catch/error path keeps the generic
message.

Co-authored-by: SamirSaji <samirsaji13@gmail.com>

---------

Co-authored-by: SamirSaji <samirsaji13@gmail.com>
Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
2026-07-29 05:52:35 +00:00
Connor Peet
05e54262fe
Merge pull request #327398 from dsavy4/fix/stablestringify-shared-refs
Fix stableStringify treating shared references as circular
2026-07-28 22:50:18 -07:00
Dileep Yavanmandha
1acfef960e
Remove deprecated terminal sandbox settings (#327881)
* changes

* Removing deprecated settings and refactor
2026-07-29 05:36:24 +00:00
Yogeshwaran C
179db2cbb5
fix(server): propagate --enable-proposed-api in serve-web (#310207)
* fix(server): propagate --enable-proposed-api in serve-web

The `code serve-web` CLI accepts `--enable-proposed-api EXTENSION_ID`
but never propagated the allowlist to the workbench environment service
or the server-side extension scanner. As a result, extensions declaring
`enabledApiProposals` in their package.json had their proposals wiped
at runtime by ExtensionsProposedApi and failed to activate.

This wires the flag through two paths so it matches desktop behavior:

1. Server scanner: extend IProductService.extensionsEnabledWithApiProposalVersion
   in setupServerServices so the node extension scanner keeps the manifest's
   enabledApiProposals when --enable-proposed-api is passed.

2. Workbench env service: add a new `enabledExtensionProposedApi` field to
   IWorkbenchConstructionOptions, populate it from the CLI args in
   webClientServer, and surface it via BrowserWorkbenchEnvironmentService
   .extensionEnabledProposedApi so the runtime allowlist in
   ExtensionsProposedApi matches the requested IDs.

Fixes #228781

* cli: forward --enable-proposed-api to serve-web subprocess

The Rust CLI parses --enable-proposed-api as a global EditorOptions flag
but was not forwarding it to the node server subprocess spawned by
serve-web. As a result, the flag never reached the server's argv parser
and the server-side plumbing in serverServices.ts and webClientServer.ts
had no input to act on.

Capture the flag in ConnectionManager from CommandContext and pass it
through StartArgs, then append --enable-proposed-api=<id> for each
requested extension ID when spawning the server process.

* fix(server): update proposed API propagation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 05:29:41 +00:00
Dmitriy Vasyura
11d08c01cd
Merge branch 'main' into fix/stablestringify-shared-refs 2026-07-28 22:25:16 -07:00
Rob Lourens
93b7a2100c
chat: remove latest response reserved height (#327956)
Remove the minimum-height filler from the latest chat response and clean up the related layout state, option plumbing, CSS, and component fixture.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 03:57:51 +00:00
Justin Chen
8fdf719d28
chat: completed response disclosure (#327923)
* chat: completed response disclosure

* address feedback + fix
2026-07-29 03:52:43 +00:00
vs-code-engineering[bot]
632430bbe6
fix: guard terminal resize against disposal to prevent xterm dimensions error (fixes #316419) (#316424)
During _onProcessExit → dispose(), the _onDisposed event fires before
super.dispose() is called, so isDisposed is still false. Event listeners
triggered during _onDisposed can reach setVisible → _resize →
_updatePtyDimensions, which accesses xterm's dimensions getter. The
getter throws because xterm's internal renderer is in a bad state during
the disposal process.

Add a _isDisposing flag set at the start of dispose() and check it in
_resize() to prevent resize operations during the entire disposal
process, not just after it completes.

Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
2026-07-29 03:47:05 +00:00
Vector341
80fdba6cbc
[html] fix validation error on JavaScript block comment (for #171153) (#240932)
* Fix validation error on JavaScript block comment with arrow in HTML script

* Add test suite

* html: handle multiple inline HTML comments

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 03:46:53 +00:00
vs-code-engineering[bot]
b169f020f5
fix: format MCP scan parse errors instead of [object Object] (fixes #322117) (#322125)
fix: format MCP scan parse errors instead of [object Object]

Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
2026-07-29 03:46:48 +00:00
Alexander Wu
e88a48241c
[trivial] Add example sources to docstrings in cursorEvents.ts (#241250)
Add example sources to docstrings in cursorEvents.ts
2026-07-29 03:41:52 +00:00
Rob Lourens
073436ddc4
Sanitize malformed generated Agent Host session titles (#327948)
* Sanitize malformed generated session titles

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address generated title review feedback

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Limit generated title output tokens

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 03:34:19 +00:00
Rob Lourens
df3f65e4f6
Cover the client-hosted filesystem in the agent host E2E suite (#327934)
* agentHost: cover the client-hosted filesystem end to end

The resource* family was the largest contract gap the protocol-surface
coverage surfaced: ten of the fourteen uncovered commands were filesystem
operations, tested only in the frozen protocol suite, which side-loads a mock
agent and so cannot describe the contract for a different AHP implementation.

Adds a conformance suite covering both directions. Client to server is the
command surface the host executes against its own filesystem. Server to client
is the reverse direction, where the host addresses client-side files through
the vscode-agent-client scheme and asks the connected client for them - a
configuration nothing in the E2E suite previously reached.

The reverse direction is driven by a real host feature rather than a synthetic
call: a client publishes a plugin customization, and the host materializes it
by copying the directory out of the client. TestProtocolClient now records the
reverse requests it serves, so the test asserts the host actually reached back
rather than resolving the path locally, and asserts the resulting load state -
the customization notification fires on both the success and failure paths, so
without it a sync that reads and then fails would still look green.

Protocol-surface command coverage moves from 15/29 (51.7%) to 25/29 (86.2%).

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: address filesystem coverage review feedback (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: compare reverse-request paths through URI on both sides

The Windows E2E leg failed on the client-hosted plugin test. The host had in
fact reached back to the client - the log shows resourceResolve, resourceList
and a resourceRead of plugin.json - but the assertion did not recognize them.

The filter compared `URI.parse(uri).fsPath` against the raw `pluginRoot`, and
`fsPath` lower-cases the Windows drive letter: a served `file:///c%3A/...`
never matches a root of `C:\...`. Both sides now go through `URI`, so they
are normalized identically on whichever platform the test runs.

Introduced by the earlier review fix that replaced a substring match with a
path comparison; the substring version happened not to hit this.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 03:33:49 +00:00
Lee Murray
36989dc359
Merge pull request #291241 from DamianKocjan/fix-281241
Refresh icon arrows not align in the center (fix: #281241)
2026-07-29 04:19:30 +01:00
Emrecan Karaçayır
a9c8db21a5
Fix for missing terminal suggest symbol icon css mappings (#293158) 2026-07-29 02:49:18 +00:00
Emrecan Karaçayır
3771972185
Fix for extension button separator wrong color precedence (#293120)
Fixes: #293118

Co-authored-by: Emrecan Karaçayır <developer@karacayir.com>
2026-07-29 02:48:15 +00:00
Don Jayamanne
df026f0850
agent host: sync user customizations to remote hosts (#327946)
* updates

* agent host: sync user customizations to remote hosts

- Remote Agent Hosts discover the remote home rather than the client's, so
  forward enabled user agents, skills, instructions, and prompts.
- Keep local Agent Hosts on native discovery to avoid duplicating same-machine
  customizations.
- Preserve per-file opt-out and client-origin grouping for recovered user
  customizations.

Fixes #327754

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 02:47:50 +00:00
Vladimir Piskarev
e51dbbec09
Cleanup some JSDocs related to observables (#228739) 2026-07-29 02:40:42 +00:00
Dan Brown
f8f7ae2cb7
Terminal tab title: Show "~" instead of "$HOME" (#275378)
* Terminal tab title: Show "~" instead of "$HOME"

* Update src/vs/workbench/contrib/terminal/browser/terminalInstance.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Megan Rogge <merogge@microsoft.com>
Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
2026-07-29 02:40:33 +00:00
Copilot
8925820f67
Collapse ., / ,, punctuation artifacts in dictation transcript cleanup (#327828) 2026-07-29 02:23:51 +00:00
Copilot
1c2a7753fa
Continue chat dictation after a manual transcript edit (#327832) 2026-07-29 02:18:05 +00:00
Copilot
a2644e459b
Stop editor/terminal dictation via start-command toggle; drop Escape stop keybinding (#327826)
* Initial plan

* Stop dictation via toggle of start command; remove Escape keybinding

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Add dictation help text to editor and terminal accessibility help dialogs

- Add `AccessibilityHelpNLS.editorDictation` string to standaloneStrings.ts
  with keybinding reference to workbench.action.editorDictation.start
- Update editorAccessibilityHelp.ts to surface dictation start/stop toggle
  help text when speech is available (HasSpeechProvider or built-in engine)
- Update terminalAccessibilityHelp.ts to document that
  workbench.action.terminal.startVoice starts and stops dictation

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Co-authored-by: Megan Rogge <merogge@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-29 02:17:27 +00:00
Copilot
8f3e764e1d
Terminal dictation: click-to-stop mic, discoverable Stop keybinding, shell-aware post-processing (#327825) 2026-07-29 02:17:06 +00:00
Anthony Stewart
cbcbf079ac Fix bug in inlineCompletionsModel.ts 2026-07-29 04:16:08 +02:00
Connor Peet
f5e16866d1
chat: keep the response selection intact for the Ask Question widget (#327931)
- Resolves the selected response from the text nodes that actually
  contribute characters rather than the raw anchor/focus nodes. Browsers
  park a line selection's endpoint at offset 0 of the *next* block, which
  for the last line of a response lands outside the markdown part
  entirely, so a triple-click (the natural way to select a whole line)
  looked like an out-of-scope selection and dismissed the widget.
- Paints the captured range with a CSS custom highlight once the native
  selection is gone. Focusing the textarea collapses the document
  selection as a browser side effect, so the text the question is about
  visually disappeared the moment the user clicked in to type it.
- Sources the highlight color from a theming participant instead of a
  stylesheet, because highlight pseudo-elements only inherit custom
  properties from the root element and cannot see the `--vscode-*`
  variables scoped to `.monaco-workbench`.
- Positions the widget from the range's visible line boxes, so the empty
  box a line selection leaves in the following block no longer pushes it
  a line too low.

Fixes #327706
Fixes #327707

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 02:15:29 +00:00
Rob Lourens
50b1915ca1
Increase layer checker heap limit (#327942)
build: increase layer checker heap

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 02:14:51 +00:00
KevinWang-wpq
b7c14909f5
Remove stale secrets after decryption failure (#324014) 2026-07-29 01:48:29 +00:00
Dmitriy Vasyura
52a4661aca
Merge branch 'main' into fix-281241 2026-07-28 18:37:28 -07:00
Muszic
fab68ed0cd fix: correct ArrayQueue boundaries in takeWhile and takeFromEndWhile 2026-07-29 03:35:18 +02:00
Osvaldo Ortega
b89d0ac849
chat: bring the sticky prompt header to the regular window (#327889)
* chat: bring the sticky prompt header to the regular window

The prompt timeline's sticky header — the band that pins the prompt you
have scrolled past to the top of the transcript, with previous/next
navigation — only existed in the Agents window, because it lived in
vs/sessions and only that layer loaded it.

Move the feature to vs/workbench/contrib/chat and register it from
chat.shared.contribution, which both windows import, so the chat view and
chat editor get the same header from one implementation. The rail (ruler
and dock) stays Agents-window only: its layout and content reservation are
built for the centered session view, so it is now gated on
IWorkbenchEnvironmentService.isSessionsWindow.

Replace sessions.promptTimeline.stickyHeader with
chat.promptTimeline.stickyHeader, defaulting to on outside stable, and
migrate an existing opt-in over. Mount the header only on widgets that
render their input below the transcript (new IChatWidget.rendersInputOnTop),
which excludes quick chat and the new-session composer.

The band now composites the request-bubble tint over the widget's own list
background so it stays opaque over scrolling rows in either host, with the
Agents window's box model kept as an override. Also document the header in
the chat accessibility help, and stop scanning the whole transcript on every
scroll now that the header is on by default.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: only describe the sticky prompt header where it is mounted

The accessibility help derived the sticky-header text from the setting alone,
with a 'not quick chat' proxy for the host check. The new-session composer
(agentSessionsWelcome) is a ChatAgentLocation.Chat widget with
renderInputOnTop, and AgentChatAccessibilityHelp's when clause does not
exclude it, so its help could announce a header and Previous/Next buttons
that are not there.

Export the contribution's own predicate as isStickyPromptHeaderShown and use
it for the help text, so the two cannot drift. Cover the predicate and the
help branch with tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 01:34:39 +00:00
Yogeshwaran C
0f905522ac
Show keybinding in Toggle Search Details tooltip (#311859)
The Toggle Search Details button's hover tooltip showed a static label,
unlike other search view buttons that use
keybindingService.appendKeybinding(label, commandId) to surface the
configured shortcut (see appendSearchWithAIButton at line 1741 and
appendSearchInOpenedEditorsMessage at line 2043 in the same file).

Use the same pattern so the button's tooltip reflects
workbench.action.search.toggleQueryDetails (Ctrl+Shift+J by default).

Fixes #131484

Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
2026-07-28 18:32:57 -07:00
Connor Peet
2a80a44327
agentHost: fix Claude side chats during active turns (#327915)
* agentHost: fix Claude side chats during active turns

- Prevents active AHP request IDs from being passed to Claude as fork anchors, because the SDK only accepts persisted assistant message UUIDs.
- Preserves the quick /btw workflow by falling back to captured source context until Claude has produced a forkable response.
- Adds regression coverage for creating a side chat before the source response begins.

Fixes #327701

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: address review feedback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 01:27:23 +00:00
Yogeshwaran C
52e8e9cfd6
Add package.json catalog support for npm completions and hover (#307989)
Extend the npm extension to recognize the `catalog` section in
package.json, enabling IntelliSense completions, version suggestions,
and hover information for packages listed under the catalog key.
This supports the catalog feature used by pnpm, bun, and yarn for
centralizing dependency versions in monorepos.

Fixes #294609

Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
2026-07-29 01:23:55 +00:00
Copilot
e4bde2ca44
NES: announce a meaningful screen reader message for next edit suggestions (#327666)
* Initial plan

* NES: announce meaningful message for next edit suggestions to screen readers

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
2026-07-29 01:17:33 +00:00
Megan Rogge
029e12f10e
Fix chat tips in Agents new session composer (#327919) 2026-07-29 00:48:59 +00:00
RedCMD
05e29316e7
fix: bug in Restrict continue comment (#322668)
* fix: Restrict continue comment to whitespace separated slashes

* fix: bug introduced in #321230

---------

Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
2026-07-29 00:47:49 +00:00
Moli
2b604e8b63
docs: Fix incorrect directory paths in CONTRIBUTING.md files (#325810)
Fixed incorrect directory paths in json-language-features and html-language-features CONTRIBUTING.md files. The paths were missing hyphens which would cause command failures when users try to follow the documentation.

- Fixed: json-languagefeatures/server/ → json-language-features/server/

- Fixed: html-languagefeatures/server/ → html-language-features/server/
2026-07-29 00:46:46 +00:00
Yogeshwaran C
e07c402392
[json] add #region folding markers to language configuration (#318515)
Adds folding markers for //#region and //#endregion to the json/jsonc
language configuration so that the minimap section headers feature
(editor.minimap.showRegionSectionHeaders) recognizes them and renders
the corresponding section labels.

vscode-json-languageservice already provides folding ranges for these
markers in jsonc, but the minimap section headers contribution reads
folding markers from the language configuration only, which is why the
labels were missing.

Fixes #219561
2026-07-29 00:28:54 +00:00
Rob Lourens
fafe3e543e
agentHost: Start local Agent Host earlier (#326768)
* agentHost: start local host earlier

Prewarm the local Agent Host during the Ready phase, react to cached startup enablement, and keep late local/remote initialization surfaces coherent. Add startup timing instrumentation for process connection, provider registration, authentication, proxy discovery, and initial session listing. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: respect AI feature opt-out

Prevent the Agent Host process from launching when chat.disableAIFeatures is enabled, even if Agent Host enablement is otherwise true. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: share AI disabled setting id

Use one platform-owned identifier for chat.disableAIFeatures across Agent Host, chat, sessions, extension management, layout, and tests. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: fix enablement browser tests

Inject the runtime platform into the testable enablement implementation and register the AI opt-out test at suite scope. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: update remote client test enablement

Adapt the merged remote Agent Host client test to observable enablement and stable relayed client surfaces. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: respect masked AI opt-out (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: keep Agents setup behavior unchanged (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: simplify lifecycle optimization (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: clean up formatting (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: add startup performance marks (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-28 23:49:25 +00:00
Megan Rogge
3d9c582357
Fix applying LLM dictation cleanup (#327925)
Remove the post-response faithfulness gate that discarded successful cleanup output before it reached the chat input. Keep the refusal fallback and remove obsolete validator tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5ecd2473-63cb-46ba-a12b-111c90dd5fcf
2026-07-28 23:37:46 +00:00
Ulugbek Abdullaev
ad6a5fe3be
nes: fix: share in-flight speculative requests across concurrent calls (#327922)
* nes: fix: share in-flight speculative requests across concurrent calls

A speculative request is fired when a suggestion is shown, betting on the
document state that results if the user accepts it. `consumePending()` nulled
the pending slot as soon as the first `getNextEdit` caller claimed the request,
so a second overlapping caller for the same post-edit state could not discover
it and issued a duplicate model request — losing the latency win, the
`ReusedRequestKind.Speculative` telemetry, and the `liveDependentants` sharing
that keeps a joined request alive for multiple dependants.

Rename it to `claimPending()` and keep claimed requests in a map until their
`result` settles, so concurrent callers join the in-flight request instead.
A map rather than a single slot: several speculatives can be claimed at once
(e.g. one per document), and evicting one on the arrival of another would
reintroduce the same bug.

Claimed requests deliberately survive the "nobody will want this anymore"
cancellation reasons (Replaced, Superseded, Rejected, IgnoredDismissed,
trajectory divergence) since they have a live consumer; `invalidateClaimed()`
still cancels them for reasons that invalidate the result itself (CacheCleared,
DocumentClosed, Disposed).

Also settle `firstEdit`/`result` in `_runSpeculativeProviderCall`'s outer catch.
Previously a throw at the first `editStream.next()` left them unsettled forever,
hanging any caller that reused the request — a pre-existing bug that the claimed
map would otherwise widen into a permanent map entry.

Behavior is unchanged when `inlineEdits.speculativeRequests` is off: the claimed
map can only be populated via `_triggerSpeculativeRequest`, which is gated on the
setting, so every new lookup degenerates to an empty-map no-op.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b9cc340f-f2af-491d-a411-6e1c2c19583e

* nes: test: cover speculative that throws before its first streamed edit

The outer catch in `_runSpeculativeProviderCall` settles `firstEdit`/`result`
so a caller reusing the request cannot hang, but nothing exercised it: every
existing speculative test yields at least one edit or is cancelled.

Add a `throwBeforeFirstYield` harness behavior and a regression test that claims
such a speculative. `getNextEdit` rethrows the underlying error for
`NoNextEditReason.Unexpected`, so the joiner rejects with the provider error
instead of awaiting forever, and the released claim lets the following request
recover with a fresh provider call.

Verified to fail without the fix: the joining call times out after 8s.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b9cc340f-f2af-491d-a411-6e1c2c19583e

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b9cc340f-f2af-491d-a411-6e1c2c19583e
2026-07-29 04:30:27 +05:00
Rob Lourens
086cb29b41
copilot: stop monitoring sessions when editor CLI is hidden (#327924)
Stop hidden editor Copilot CLI session monitoring

Use the editor-window Extension Host visibility setting to control the shared session-state watcher while preserving the existing Agents-window behavior.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-28 23:25:34 +00:00
Kyle Cutler
7f42760166
Allow pressing Enter to add focused browser element to chat (#327875)
* Allow pressing Enter to add focused browser element to chat

* feedback
2026-07-28 23:18:50 +00:00
Chris Westra
84e7f9134c
Log organization resource cache creation failures (#326958)
* Refresh organization instructions after auth changes

Preserve cached instructions on fetch failures and refresh organization resources when authentication or workspace selection changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5b647a0f-5022-4a32-959a-ad8c129b1614

* Add organization resource refresh diagnostics

Log refresh outcomes, cache resource counts, prompt length, and cache preservation without recording instruction content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5b647a0f-5022-4a32-959a-ad8c129b1614

* Narrow organization resource change to cache diagnostics

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5b647a0f-5022-4a32-959a-ad8c129b1614

---------

Copilot-Session: 5b647a0f-5022-4a32-959a-ad8c129b1614
2026-07-28 16:14:21 -07:00
Copilot
21dbff9b8a
fix: prevent list cutoff at bottom of agent customization view (#327248)
* Initial plan

* fix: prevent list cutoff at bottom of agent customization view

The AICustomizationListWidget.layout() method was setting an explicit
pixel height on its element, causing it to overflow its padded parent
container (prompts-content-container has padding: 40px 40px 16px with
overflow: hidden). The bottom portion of the list was clipped.

Fix: clear the explicit height style so CSS-computed height (height: 100%)
takes effect inside the parent's padding box, then read clientHeight to
get the actual available space before computing the Monaco list height.
This mirrors the approach already used by McpListWidget.layout().

Co-authored-by: aeschli <6461412+aeschli@users.noreply.github.com>

* Make group-header rows non-selectable to fix double focus border and hover highlight

Co-authored-by: aeschli <6461412+aeschli@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aeschli <6461412+aeschli@users.noreply.github.com>
Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
2026-07-28 23:14:16 +00:00
Rushil Patel (rusp)
4f612f37b7
feat: add copy button to code blocks in markdown preview (#323609) 2026-07-28 23:14:03 +00:00
Ulugbek Abdullaev
8452ae0936
Sessions: Preserve archive action behavior (#327907)
sessions: fix: preserve archive action behavior

Keep bulk archive actions immediate and retain pinned-row archive targets throughout the fold animation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3d3c3a74-afb4-4172-8d37-698a2241503c
2026-07-28 23:13:41 +00:00
Copilot
152e21d194
Voice mode: static placeholder text, subtler glow, refined barge-in hint (#327854)
* Initial plan

* Voice mode: static placeholder text, subtler glow, updated barge-in hint

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>

* chat: use pill radius for expanded dictation mic glow

Fixes the dictation active glow radius inside the segmented voice toggle so it renders as a pill rather than a squircle when expanded.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: align dictation mic glow with voice mode listening glow

Updates the active dictation mic glow to match the inner border and inset wash style used by voice mode while listening, replacing radial gradients with a subtle inset shadow and border.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Co-authored-by: Elijah King <elijahwilliamking@icloud.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Megan Rogge <merogge@microsoft.com>
2026-07-28 23:03:50 +00:00