Skip to content

[pull] main from microsoft:main#1365

Merged
pull[bot] merged 59 commits into
KingDEV95:mainfrom
microsoft:main
Apr 30, 2026
Merged

[pull] main from microsoft:main#1365
pull[bot] merged 59 commits into
KingDEV95:mainfrom
microsoft:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 30, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Aashna Garg and others added 30 commits April 28, 2026 15:45
The router decision restricted event logs candidateModels (router
output) but not the input model pool sent to the router. Without
this field we cannot determine whether per-SKU CoGS differences
come from different input pools vs different routing decisions.

Add availableModels as a JSON-stringified array of the model
identifiers passed in the available_models request body field.
This new version causes issues in the production build only. Fix is in microsoft/vscode-markdown-languageserver#18 but reverting for now
…313280)

Specify max chars in askQuestions tool description, drop question truncation

Fixes #312726
…d-telemetry

Add availableModels to routerDecisionRestricted telemetry
Fixes #313281

Gate was mainly to help reduce noise on initial rollout
…ed) (#313278)

* hide unsupported customizations categories in Agents app (harness-based)

* Fix mock harness descriptor icons

Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/ce93aa65-5ce5-43c9-92bf-a0fc1b9d0150

Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Include the `isAvailable` check in the codebase timeout
Enable external ingest for non-file resources too
* chore: migrate agent-browser to @playwright/cli

Replace all uses of the `agent-browser` automation tool with `@playwright/cli`,
which supports `npx @playwright/cli attach --cdp=<port>` for connecting to
Electron/Chromium apps via CDP.

- Rewrite launch SKILL.md files (Code OSS and Copilot variants) with new
  command mappings: attach --cdp, tab-list, snapshot, screenshot --filename,
  fill, press
- Update auto-perf-optimize and chat-customizations-editor skills with
  @playwright/cli commands; fix eval blocks to use IIFE syntax required by
  the new tool
- Migrate testRemoteAgentHost.sh: connect→attach --cdp, snapshot -i→snapshot,
  screenshot path→screenshot --filename=path; verified end-to-end with --skip-message
- Remove agent-browser from extensions/copilot/package.json (covered by root
  devDependency); bump @playwright/cli to ^0.1.9 in root package.json

* fix: add @types/ws as explicit devDependency in copilot extension

Previously pulled in transitively via agent-browser -> webdriver.
Now that agent-browser is removed, @types/ws must be declared directly.
Revert to previous vscode-markdown-languageserver
Yoyokrazy and others added 27 commits April 29, 2026 14:41
Follow-up to #313128. The VSCODE_OSS fallback isn't needed for the
api.github.com calls in core-ci — secrets.GITHUB_TOKEN already
authenticates those reads with permissions: contents: read (added in
#304929), so we don't hit the anonymous rate limit on 1ES.
* add enabled property to ICustomAgent

Co-authored-by: Copilot <copilot@github.com>

* update

* update

---------

Co-authored-by: Copilot <copilot@github.com>
agentHost: implement plan and native autopilot modes
* Support browser context attachment

* feedback
Use tsgo for typechecking copilot extension
Fixes #313363

Co-authored-by: Copilot <copilot@github.com>
gpt-5.4-mini was incorrectly matching the startsWith check and getting
tool search enabled. Switch to exact equality so only gpt-5.4 and
gpt-5.5 qualify. Also remove the gpt5-5 variant that no longer exists.
- Add GenAiProviderName.GEMINI; switch geminiNativeProvider, anthropicProvider, copilotcliSession to use GenAiProviderName.* constants
- Add CopilotChatAttr.HOOK_TYPE/HOOK_INPUT/HOOK_OUTPUT/HOOK_RESULT_KIND, MODE_NAME, TOTAL_COST_USD; switch chatHookService, claudeMessageDispatch, copilotCliBridgeSpanProcessor, chatDebugFileLoggerService, otelSpanToChatDebugEvent, toolCallingLoop, claudeOTelTracker to use the new constants
- Add CopilotCliSdkAttr group for SDK-emitted hook attribute keys (github.copilot.hook.*); switch consumers in copilotCliBridgeSpanProcessor and otelSpanToChatDebugEvent
- Replace magic-number SpanStatusCode casts in copilotCliBridgeSpanProcessor with the enum members
- Expand otel barrel index.ts to re-export CopilotCliSdkAttr and previously-missing event helpers (emitEditFeedbackEvent, emitEditHunkActionEvent, emitInlineDoneEvent, emitEditSurvivalEvent, emitUserFeedbackEvent, emitCloudSessionInvokeEvent)

No behavior change.
Adds .github/skills/otel/SKILL.md describing:
- The two source-of-truth docs (agent_monitoring.md and agent_monitoring_arch.md)
- The four agent execution paths and their OTel strategies
- Canonical file map for all OTel code
- Service layer (NoopOTelService / NodeOTelService / InMemoryOTelService)
- Span / metric / event conventions, content-capture gating, debug-panel vs OTLP isolation
- Configuration surface invariants (settings + env vars + agent env-var translation)
- Procedure checklists for adding spans / metrics / events / new agent surfaces
- Validation commands and known risks/anti-patterns

Mandates that the two monitoring docs stay in sync with code changes.
- When both a local and remote agent host provide the same session
  (e.g. Copilot coding agent), sessions appeared duplicated in the
  sidebar because getSessions() returned entries from all providers
  without deduplication.
- Adds a `deduplicationKey` to ISession so providers can signal that
  two session objects represent the same underlying session.
- Implements deduplicateSessions() in SessionsManagementService that
  prefers the local agent host provider when duplicates exist, keeping
  the UI responsive while preserving remote-only sessions.

Fixes #313103

(Commit message generated by Copilot)
agent_monitoring.md (user-facing):
- Add github.copilot.chat.otel.dbSpanExporter.enabled to the settings table
- Add dbSpanExporter as a fourth Activation trigger
- Add Commands subsection for 'Chat: Export Agent Traces DB'
- Add claude-code row to the service.name filter table

agent_monitoring_arch.md (developer-facing):
- Correct the Multi-Agent Architecture row for Claude (synthesized from SDK
  messages via claudeMessageDispatch.ts + chatMLFetcher proxy, not 'message loop')
- Rewrite the Claude span hierarchy diagram to show subagent nesting under
  execute_tool Agent, and remove stale claudeHookRegistry/claudeCodeAgent
  references and PR-number annotations
- Replace bogus claudeCodeAgent.ts/claudeHookRegistry.ts rows in the
  Instrumentation Points table with the real emit sites
  (claudeOTelTracker.ts, claudeMessageDispatch.ts, claudeLanguageModelServer.ts,
  chatHookService.ts, geminiNativeProvider.ts)
- Expand File Structure with workspaceOTelMetadata, sessionUtils, sqlite/,
  the Claude folder layout, chatHookService, and otlpFormatConversion
- Correct the Implementations table: InMemoryOTelService is the fallback
  when OTel is disabled (not always-on alongside NodeOTelService); document
  the selection in services.ts
- Add Activation Channels subsection mapping OTelConfig.enabledVia values
- Expand the Env Var Translation table with OTEL_METRICS_EXPORTER,
  OTEL_LOGS_EXPORTER, OTEL_LOG_TOOL_DETAILS, OTEL_EXPORTER_OTLP_PROTOCOL,
  COPILOT_OTEL_EXPORTER_TYPE
- Document FilteredSpanExporter alongside DiagnosticSpanExporter in the
  Debug Panel vs OTLP Isolation section
- Update Testing tree with all current spec files
Addresses copilot-pull-request-reviewer feedback on PR #313383:

- otelSpanToChatDebugEvent.ts: replace 6 magic-number 'span.status.code === 2 /* ERROR */' / '=== 1 /* OK */' checks with SpanStatusCode.ERROR / SpanStatusCode.OK. Switched the SpanStatusCode import from type-only to value to enable runtime use of the enum members.
- genAiAttributes.ts: correct HOOK_RESULT_KIND doc to include 'non_blocking_error' (chatHookService also produces this value); soften HOOK_INPUT/HOOK_OUTPUT docs since emitters do not currently gate on captureContent.
- .github/skills/otel/SKILL.md: replace the blanket 'always gate content on captureContent' guideline with the actual two-pattern convention used in the codebase: (1) tool args / hook input-output are always emitted (truncated only) for debug-panel essentials, (2) full prompt/response bodies and system instructions are gated on captureContent. Aligns the skill doc with how toolsService.ts and chatHookService.ts actually behave.

Did NOT add captureContent gating to chatHookService.ts hook input/output (reviewer suggestion 3): doing so would regress the Agent Debug Log panel for default users (captureContent is false by default), and would diverge from the existing toolsService.ts pattern that explicitly states 'Always capture tool call arguments for the debug panel'. A proper fix needs exporter-level stripping in DiagnosticSpanExporter and is out of scope for this PR.
Add groups for md extension configuration
…13369)

Each execute() call registered a per-call DisposableStore via
this._register(store), but store.dispose() in the finally block does
not remove the reference from the parent _toDispose Set. Stale,
already-disposed stores accumulated across invocations on long-lived
strategies (28 observed in the wild).

Track in-flight stores in a dedicated _executionStores DisposableStore
and delete(store) on completion. Preserves the mid-flight disposal
cleanup from #310157 while clearing the reference on the happy path.

Fixes #313368
* fix: avoid TOCTOU race in smoke test click by using page.click

The smoke test for statusbar 'quick input' was flaky because click() in
PlaywrightDriver used two separate operations:
  1. getElementXY( CDP round-trip to get {x, y}selector)
  2. page.mouse.click(x,  another CDP commandy)

Between these two steps, the page's JS event loop is free to process
queued tasks (~1ms window). In the failing case, the markdown-language-
features extension registers a Language Status '{}' item in the status
bar during this window, shifting the EOL item's x position. The click
then lands on '{}' instead of EOL.

Clicking '{}' invokes ShowTooltipCommand which calls hover.show(true),
trapping keyboard focus in a hover  so the EOL quick input neverwidget
opens and the test times out.

Fix: use page.click(selector) for the common no-offset case. Playwright's
native click waits for the element's bounding box to be stable across
multiple frames before dispatching the click, eliminating the race.

Validated with 50 consecutive runs (0 failures vs. ~1-in-22 before).

Also delete ELECTRON_RUN_AS_NODE from the environment before launching
the test binary. When this env var is set, Electron acts as a plain
Node.js binary and rejects Chromium flags like --remote-debugging-port
that Playwright injects, preventing dev-mode smoke tests from launching.

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

* address review: fix double-offset bug and reduce page.click timeout

- Fix pre-existing double offset: getElementXY already incorporates both
  xoffset/yoffset into the returned coordinates, so don't add them again
  in mouse.click when both offsets are provided.
- Reduce page.click timeout from 2000ms to 100ms so each poll attempt
  in waitAndClick's retry loop (200  100ms = 20s budget) stays within
  its intended time budget.
- Use xoffset ?? 0 / yoffset ?? 0 instead of falsy checks.

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

* fix: fall back to legacy click for elements with degenerate bounding box

The previous attempt to use page.click() for all clicks broke smoke tests that
target elements like Monaco's hidden .native-edit-context contenteditable, which
Playwright refuses to interact with (even with force: true) because the element
has a degenerate bounding box. Try page.click first (preserves the TOCTOU fix
for status bar items), then fall back to getElementXY + mouse.click on failure.

(Written by Copilot)

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

* fix: don't skip Playwright actionability checks on click

Removing 'force: true' from page.click - the actionability checks (specifically
the 'stable' check that waits for the bounding box to be unchanged across 2
frames) are exactly what fixes the original TOCTOU race. Skipping them caused
clicks to fire during layout shifts and not register their handlers properly,
breaking unrelated tests like the Problems View statusbar click.

The fallback to legacy getElementXY + mouse.click still handles elements that
genuinely fail actionability checks (e.g. Monaco's hidden .native-edit-context).

(Written by Copilot)

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

* fix: narrow TOCTOU guard in statusbar.clickOn instead of broad click() change

Revert the playwrightDriver.click() change (which regressed multiple unrelated CI
tests) and instead add a narrowly-scoped fix in statusbar.clickOn(): for
editor-area status items, poll getElementXY until two consecutive samples are
identical before clicking. This guards against the language status ({}) item
shifting EOL/encoding/etc. between position lookup and click dispatch, without
affecting any other test surface.

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

* fix: use page.click with stable-coords fallback to eliminate statusbar TOCTOU

Use Playwright's page.click (which re-verifies elementFromPoint immediately
before dispatching, closing the TOCTOU window) for editor-area status bar
items. Fall back to a stable-coordinates click when page.click's actionability
check  the known case is Monaco's .native-edit-context overlayfails
(z-index: -10) which elementFromPoint returns instead of the intended target.
Before the fallback, input state is reset (mouse.move to 0,0 + small wait)
so partial hover/mousedown from the failed attempt don't corrupt subsequent
events.

The stable-coordinates fallback polls getElementXY until two consecutive
samples match, then clicks at those exact  minimising (thoughcoordinates
not eliminating) the TOCTOU window in the fallback path too.

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

* address review: narrow fallback to pointer-intercept errors, use wait() helper, clarify robustClick docs

- robustClick now only falls back on 'intercepts pointer events' errors;
  all other errors are rethrown so real failures aren't silently masked
- Wrap fallback error to preserve both the original and fallback messages
- Replace raw setTimeout with existing wait() helper
- Clarify Code.robustClick JSDoc: not a polling replacement for waitAndClick

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

* simplify: remove unnecessary input-state reset before fallback click

The 'intercepts pointer events' error fires at Playwright's actionability
check phase, before any mouse events are dispatched to the  so therepage
is no partial hover/mousedown state to reset.

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

---------

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

Detach background processes for sync-mode commands ending in trailing &
OTel: typed constants cleanup + add otel skill
@pull pull Bot locked and limited conversation to collaborators Apr 30, 2026
@pull pull Bot added the ⤵️ pull label Apr 30, 2026
@pull pull Bot merged commit 639691f into KingDEV95:main Apr 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.