Skip to content

[pull] main from microsoft:main#1357

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

[pull] main from microsoft:main#1357
pull[bot] merged 38 commits into
KingDEV95:mainfrom
microsoft:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 28, 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 : )

bryanchen-d and others added 30 commits April 27, 2026 10:51
…s from telemetry

Generalizes the existing isRateLimited / isQuotaExceeded suppression added in
#311582 so that any user-actionable / expected operational condition thrown
from a chat participant can opt out of the chatAgentError telemetry event.

- Adds errorDetails.isExpectedError to ChatErrorDetails (proposed API and
  internal IChatResponseErrorDetails).
- extHostChatAgents2 sets the flag when the thrown Error has
  name === 'ChatExpectedError'.
- mainThreadChatAgents2 skips publishing chatAgentError when the flag is set.

Lets copilot-chat (and other participants) mark errors like 'cloud agent
not enabled', missing git binary, network connectivity loss, EPERM, and UNC
host blocked as expected, removing them from error telemetry while keeping
the user-facing message.

Refs #311582 #311583 #311584 #311585 #311586 #311587
* Fix empty session_files/refs by queuing early tool spans

* fix: use correct ISpanEventRecord/ICompletedSpanData types

* test: simplify tests to use real helpers, address review feedback
Address review feedback on #312852: include isExpectedError in the
proposed-API gate alongside the other private errorDetails flags so
extensions without 'chatParticipantPrivate' enabled cannot suppress
chatAgentError telemetry by setting the flag on a returned errorDetails.
* Agents - use etag when polling pull request information

* Fix tests
…at-agent-errors

feat(chat): add isExpectedError flag to suppress expected agent errors from telemetry
Add /requires-eval-assessment comment command
…12882)

When trusting a folder or workspace from the Sessions (Agents) window,
users had no indication that the trust decision also persists to the
parent VS Code install. This adds an explanatory note to all four trust
dialog paths:

- Resources trust dialog (requestResourcesTrust)
- Workspace trust request dialog (onDidInitiateWorkspaceTrustRequest)
- Startup trust modal (onDidInitiateWorkspaceTrustRequestOnStartup)
- Add workspace folder confirmation (onWillChangeWorkspaceFolders)

The note derives the parent app name from productService.quality
(stable/insider/exploration) with a fallback to productService.nameLong.

A shared getSessionsWindowTrustNote() function avoids duplication across
all dialog handlers.

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

* Remove the usage of request()
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
)

* fix(commands): close ~chat-* dedup labels with state_reason='duplicate'

* fix(commands): close *duplicate with state_reason='duplicate'
* Be less aggressive about removing terminal in agents app

* address copilot feedbacks

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

---------

Co-authored-by: Copilot <copilot@github.com>
…moving beta tracing and content capture variables
…larity

feat(tracing): rename hook_name attribute to hook_command for better context
fix(agent): clear subagent trace contexts after request completion
)

The native <button> element was rendering with system 'buttonface'
background, overriding the transparent background. Set appearance:none
to disable native form control rendering, matching the pattern used by
welcome-prompts-input.

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

* fix: handle BudgetExceededError after background compaction re-render

When the initial render throws BudgetExceededError and a completed
background compaction is applied, the re-render was unprotected. If
the compacted prompt still exceeds the budget (e.g. many MCP tools
consuming token space, or cache breakpoints preventing pruning), the
BudgetExceededError propagated uncaught and crashed the chat with
'No lowest priority node found'.

Now the re-render is wrapped in a try-catch that falls back to
renderWithoutSummarization (full budget, no cache breakpoints) on
BudgetExceededError, with telemetry outcome 'appliedButReRenderFailed'
to track how often this path is hit.

Fixes #311407

* fix: update telemetry for background compaction outcomes and re-render handling
* Add account indicator to mobile titlebar in agents workbench

The mobile titlebar now shows a contextual right slot:
- Welcome / new session screen: [☰] [title] [account]
- In a chat session: [☰] [title] [+]

The account indicator mirrors the desktop titlebar account widget:
- Shows GitHub avatar when signed in, codicon fallback otherwise
- Displays dot badge for quota warnings/errors
- Tapping opens a panel with account info, copilot status dashboard,
  and sign-in/sign-out actions
- Touch-friendly: 44px minimum touch targets, touch-action: manipulation

Also extracts the AccountMenu MenuId to Menus.AccountMenu for sharing
between the desktop and mobile implementations.

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

* Fix account panel immediately dismissing on mobile tap

The hover service registers a document-level mousedown listener for
sticky hovers that dismisses the hover when clicking outside it. On
mobile, the mousedown fires in the same event cycle as the click that
opens the panel, so the hover was created and then immediately
dismissed.

Defer the showInstantHover call to the next animation frame so the
mousedown event has completed before the sticky listener is registered.

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

* Use DOM overlay for mobile account panel instead of hover service

The hover service's sticky mousedown/mouseout handling doesn't work
reliably on mobile touch devices. Replace it with a simple DOM overlay
pattern: a full-screen backdrop that catches taps to dismiss, with the
panel absolutely positioned below the top bar.

This is more appropriate for mobile UX — touch interactions work
natively without fighting the desktop hover infrastructure.

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

* Fix account panel styling by appending inside workbench container

The panel was appended to document.body, outside the
.agent-sessions-workbench container, so none of the existing
.sessions-account-titlebar-panel-* CSS selectors matched.

Append the backdrop and panel inside the workbench container so
the desktop panel styles (header, actions, dashboard, separators)
apply correctly on mobile.

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

* Redesign mobile account panel as full-screen bottom sheet

Replace the desktop-style dropdown with a native mobile bottom sheet:

- Full-screen sheet with header (title + close button)
- Profile section with large avatar + name + provider
- Copilot status dashboard when signed in
- Large touch-friendly action rows (52px height, 16px font)
  with icons for Sign In/Out and Settings
- Proper safe area insets for notched devices
- Scrollable content area with overscroll containment
- All new CSS classes (mobile-account-sheet-*) purpose-built
  for mobile — no reuse of desktop hover panel styles

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

* Fix scopeListOrRequest is not iterable in signIn

When product.json defaultChatAgent.providerScopes is empty,
scopes[0] evaluates to undefined. The spread in createSession
then fails with is not iterable. Default to an empty array.

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

* Add OAuth callback support to sessions web dev server

The sessions dev server was missing two things needed for GitHub
OAuth sign-in to work:

1. A /callback route serving the OAuth redirect page (callback.html)
   that writes the auth code to localStorage
2. A urlCallbackProvider passed to the workbench create() options
   that polls localStorage for the auth code and delivers it back
   to the GitHub authentication extension

Without these, the OAuth flow would complete on GitHub's side but
the auth code was never delivered back to the workbench.

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

* Revert "Add OAuth callback support to sessions web dev server"

This reverts commit 4034dd5.

* Fix web walkthrough auth scope mismatch and token expiry

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

* Use product config scopes for walkthrough sign-in instead of hardcoded

The previous fix used defaultAccountService.signIn() which blocks on
the init barrier — the DefaultAccountProvider may not be set yet when
the walkthrough runs on first launch.

Instead, keep using authenticationService.createSession() directly
(which doesn't depend on the provider lifecycle) but read the scopes
from productService.defaultChatAgent.providerScopes[0] instead of
hardcoding ['repo', 'user:email', 'read:user']. This ensures the
session has the 'workflow' scope that the account provider needs
while avoiding the provider initialization race.

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

* Add fallback scopes when product config is unavailable

If productService.defaultChatAgent.providerScopes is undefined (e.g.
in vscode-dev web context where product config may not include it),
fall back to the full scope set including workflow. Without this, an
empty scopes array would create a session that the tunnel discovery
code cannot find (it filters for user:email).

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

* Listen to auth session changes directly for mobile account indicator

The mobile account indicator relied solely on
defaultAccountService.onDidChangeDefaultAccount, which depends on
the DefaultAccountProvider completing its async initialization
(extension registration, entitlement resolution). On mobile web,
the walkthrough sign-in creates the session before the provider
is fully initialized, so the event is missed.

Also listen to authenticationService.onDidChangeSessions to pick up
new GitHub sessions immediately when they're created, regardless of
the DefaultAccountProvider lifecycle.

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

* Fix account indicator showing Sign In after walkthrough on localhost

Two fixes for the mobile account indicator not reflecting auth state
after the walkthrough completes:

1. Fall back to reading GitHub sessions directly from
   IAuthenticationService when DefaultAccountService returns null.
   This covers the window between session creation (walkthrough) and
   DefaultAccountProvider initialization (extension registration).

2. When we have an account name from auth sessions but entitlement is
   still Unknown (not yet resolved), treat it as Unresolved rather
   than Unknown. This prevents getAccountTitleBarState() from
   returning 'Agents Signed Out' when the user is actually signed in
   but the entitlement service hasn't caught up yet.

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

* Hide Copilot setup dashboard in mobile account sheet when unresolved

The ChatStatusDashboard shows 'Set up Copilot to use AI features'
when the entitlement is Unknown or Available (new user). This setup
flow doesn't apply in the agents app which has its own walkthrough.

Only show the dashboard when entitlements have fully resolved to a
known plan (Free, Pro, etc). When still resolving, the profile
section already shows the account name which is sufficient.

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

* Apply same auth state fixes to desktop TitleBarAccountWidget

The desktop account widget had the same issue as the mobile one:
after walkthrough sign-in, it showed 'Agents Signed Out' because
the DefaultAccountProvider hadn't initialized yet.

Apply the same three fixes from the mobile indicator:
1. Listen to authenticationService.onDidChangeSessions directly
2. Fall back to reading GitHub sessions when defaultAccountService
   returns null
3. Override Unknown -> Unresolved when an account name is present
   to prevent showing signed-out state during entitlement resolution

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

* Add INFO-level logging to DefaultAccountProvider for debugging

Upgrade key log messages from debug to info level to trace the
account resolution flow in the browser console:
- Session count and matching results in findMatchingProviderSession
- Account name and scopes when sessions are found
- Final account state after initialization completes

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

* Use console.log for DefaultAccount debug logging

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

* Accept any session when providerScopes is empty

On vscode.dev the product config may not include providerScopes,
resulting in an empty allScopes array. The scope matching loop
never executes, so no sessions match even though valid sessions
exist. When no scopes are configured, accept any available session.

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

* Hide 'Use AI Features' button when AI features are disabled

When users disable AI features via chat.disableAIFeatures, the account
section in the Agents window should not show the 'Set up Copilot to use
AI features' button. This change checks sentiment.hidden in addition to
the other disabled states to properly hide this UI element.

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

* Hide Copilot setup dashboard in desktop account panel when unresolved

Same fix as the mobile account sheet — don't show the
ChatStatusDashboard when entitlement is Unknown or Available,
as it renders a 'Set up Copilot to use AI features' prompt
that doesn't apply in the agents app.

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

* Update

* Clean up

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
zhichli and others added 8 commits April 27, 2026 15:31
Add OTel tracing for Claude agent sessions
#312905)

* Add /chronicle:reindex command to rebuild local session index from JSONL logs

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

* Address feedback

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

---------

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
* Fix Copilot CLI remote session prompts

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

* Fix user_query sanitization

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

* Fix remote ask-user session cleanup

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

* Fix Copilot Linux lint failure

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

* Fix remote ask-user answer sync

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Remove the sessions experimental shell gradient toggle and always apply the shell gradient styling for the sessions workbench.

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

When a question (input request) is answered on one client in a multi-client
AgentHost session, the question carousel now disappears on all other clients
and shows the actual answers instead of 'Skipped'.

- Use the protocol input request id as the carousel's resolveId so the
  chat input widget can be targeted for cleanup by key.
- Track per-entry whether completion came from shared state vs local UI.
- Listen on onWillApplyAction for SessionInputCompleted to capture answers
  before the reducer removes the input request from state (the reducer
  deletes the request entirely, so answers are only on the action payload).
- Convert protocol SessionInputAnswer records back to carousel-display
  format so the summary renders 'Q: ... / A: ...' instead of 'Skipped'.
- Guard cleanup so locally-submitted carousels keep their answer data when
  the server echoes the completion back.
- Clear the matching chat input widget via IChatWidgetService when the
  request disappears from state on passive clients.

Fixes #312869

(Commit message generated by Copilot)
@pull pull Bot locked and limited conversation to collaborators Apr 28, 2026
@pull pull Bot added the ⤵️ pull label Apr 28, 2026
@pull pull Bot merged commit 1e23c4c into KingDEV95:main Apr 28, 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.