Skip to content

[mirror] microsoft/vscode#307868 fix: migrate to AsyncIterableProducer in terminal shell integration to avoid memory leaks#1092

Open
austindyoung wants to merge 3248 commits intomainfrom
driftfence/mirror/pr-307868/latest
Open

[mirror] microsoft/vscode#307868 fix: migrate to AsyncIterableProducer in terminal shell integration to avoid memory leaks#1092
austindyoung wants to merge 3248 commits intomainfrom
driftfence/mirror/pr-307868/latest

Conversation

@austindyoung
Copy link
Copy Markdown
Owner

Automated mirror PR for DriftFence counterfactual telemetry.

Source PR: microsoft#307868
Source URL: microsoft#307868
Mirror branch: driftfence/mirror/pr-307868/latest

This PR is maintained by automation for telemetry and review links.

roblourens and others added 30 commits March 31, 2026 18:41
* Add chat model reference inspection (Written by Copilot)

* Add archive state and age to chat model inspection (Written by Copilot)

* fix import

* Cleanups

* test
* Refactor padding and line-height in AI Customization Management styles for improved layout

Co-authored-by: Copilot <[email protected]>

* Update src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: mrleemurray <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Michael Lively <[email protected]>
…d consistency (microsoft#306858)

* style: update agent feedback widget styles for code review and adjust border radius

* style: adjust agent feedback widget colors for better visibility and consistency

* style: update agent feedback widget suggestion styles for improved layout and visual clarity

* style: enhance suggestion border for code review items with color-mix for better visibility

* style: update agent feedback widget suggestion header for improved clarity and consistency

Co-authored-by: Copilot <[email protected]>

* style: refactor suggestion rendering and improve CSS for consistency and clarity

Co-authored-by: Copilot <[email protected]>

* Update src/vs/sessions/contrib/agentFeedback/browser/media/agentFeedbackEditorWidget.css

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: mrleemurray <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Michael Lively <[email protected]>
…6902)

Adjust header height and padding in CIStatusWidget; refine button styles in changes view

Co-authored-by: mrleemurray <[email protected]>
Replace the temporary chat.defaultMode experiment with a proper
configuration setting chat.newSession.defaultMode whose default
is driven by TAS treatment chatDefaultNewSessionMode.

- Add DefaultNewSessionMode to ChatConfiguration enum
- Register setting dynamically via ChatAgentSettingContribution
  following the registerMaxRequestsSetting pattern
- Rewrite _setEmptyModelState to sync read the config setting
  with case-insensitive custom mode name matching
- Remove unused validateChatMode, isChatMode, and
  getDefaultModeExperimentStorageKey
- Remove IWorkbenchAssignmentService from ChatInputPart
  (moved to ChatAgentSettingContribution)

Co-authored-by: Copilot <[email protected]>
* Update distro commit to 1992012c

* Update distro commit to 084798d4

---------

Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
* Link to browser editors in tool calls

* a11y, feedback
* Show browser tab icons in editor quick access pickers

* feedback
* promptService: cache IHookDiscoveryInfo

* Update src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.ts

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Paul <[email protected]>
* Sessions - move more code into the view model

* Hide the path in the tree
…06953)

* Sessions: Add Copilot status indicator to sidebar footer

Add a Copilot status button to the AccountWidget in the sessions app
sidebar footer. The button shows the current Copilot status icon and
opens a ChatStatusDashboard hover popup on click.

- Add per-section disable options to ChatStatusDashboard to control
  which sections render (disableInlineSuggestionsSettings,
  disableModelSelection, disableProviderOptions,
  disableCompletionsSnooze, disableContributions)
- Copilot status button is hidden when the update button is visible
- Status icon updates based on entitlement, sessions, and quota state
- Scoped CSS overrides for dashboard popup in sessions context

Co-authored-by: Copilot <[email protected]>

* Fix Copilot status button accessibility and disposable leak

- Set aria-label on the Copilot status button so screen readers
  announce the current status tooltip
- Track dashboard DisposableStore via MutableDisposable registered
  on the widget, ensuring cleanup on widget disposal or re-click

Co-authored-by: Copilot <[email protected]>

* Remove native tooltip from Copilot status button

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
* Add readable element labels in browser tool calls

* feedback

* detail

* browser
yogeshwaran-c and others added 30 commits April 3, 2026 14:07
fix: improve test coverage filter quickpick readability
… explorer (microsoft#307555)

When typing text like "@smoke" in the test explorer filter, the @-prefix
was consumed by the tag regex but did not match any known filter term or
tag syntax. This caused the text to silently disappear from the filter,
making it impossible to search for tests with "@" in their names.

Now, @-prefixed text that is neither a known filter term (@failed, @doc,
etc.) nor a tag (@ctrlId:tagId) is preserved as regular glob filter text.

Closes microsoft#159708
* feat: add ChatHookProvider to chatPromptFiles API

Wire hooks through the same chatPromptFiles proposed API surface used
by agents, instructions, and skills:

- Add ChatHookProvider interface with onDidChangeHooks/provideHooks
- Add chat.hooks getter and chat.onDidChangeHooks event
- Add chat.registerHookProvider() registration
- Add IHookDto and $acceptHooks to ext host protocol
- Add onDidChangeHooks to IPromptsService interface and impl
- Push hook files from mainThread to ext host on change
- Fix MockPromptsService for new interface member

* polish: expand provider hook items into individual entries

The provider path was showing hooks as file-level items (e.g.
'hooks.json', 'settings.json'), while the core path expands them
into individual hook entries with type labels and command descriptions.

Add _expandProviderHookItems() that reads and parses each hook file
from the provider, expanding into the same individual entries the
core path produces (e.g. 'Session Start', 'Pre-Tool Use' with
truncated command text).
Wire installed agent plugins through the chatPromptFiles proposed API:

- Add ChatPluginResource interface with uri + label
- Add chat.plugins getter and chat.onDidChangePlugins event
- Add IPluginDto and $acceptPlugins to ext host protocol
- Push plugins from mainThread via autorun on IAgentPluginService
- Inject IAgentPluginService into MainThreadChatAgents2
)

* chat: add startup telemetry for live chat model counts

After reviving sessions with pending edits at startup, log telemetry
with the number of live chat models, how many are open in widgets,
how many are background-only, and how many are kept alive solely
because they have unaccepted edits.

- Expose whenSessionsRevived promise on IChatService
- Add browser-layer contribution that awaits revival + uses
  IChatWidgetService to classify models without hard-coded strings

Co-authored-by: Copilot <[email protected]>

* address review: error handling, void fire-and-forget, referenceCount check

- Wrap reviveSessionsWithEdits with .catch() to avoid unhandled rejection
- Mark logTelemetry() as void fire-and-forget
- Check referenceCount === 1 for modelsKeptAliveOnlyForEdits

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Remove chat.statusWidget.anonymous setting
…ions (microsoft#307677)

* agentHost: archive and store archive state for remote agent host sessions

* stub IStorageService in remote agent host sessions provider tests
* agentPlugins: clone locally when in a remote

The git extension runs on the remote side, so it's not suitable to use to clone. This just does it directly.

I would kind of like to just take this path in all cases since I previously had to add some internal commands in the git extension. But for now going into next release this only affects the remote case which was previously broken.

Closes microsoft#298701

* cleanup

* comments
* Sessions: preserve cancelled session content in list

When a session is stopped before the agent commits a worktree, keep it
in the sessions list with Completed status instead of removing it. This
lets the user review whatever content the agent produced before
cancellation.

- Use CancellationError in _waitForCommittedSession to distinguish
  cancellation from unexpected failures
- On CancellationError in _sendFirstChat/_sendSubsequentChat, set
  Completed status and fire a changed event instead of removing
- Add tests for committed-then-stopped and cancelled-before-commit flows

Co-authored-by: Copilot <[email protected]>

* Address review: defer CancellationError until timeout, remove unused variable

- Move isCanceled check from the early-exit path to after the 5s
  safety timeout so a late commit event (user stops after worktree was
  initiated but before IPC finishes) is not missed.
- Remove unused changes variable in committed-session test.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
* Sessions - move state computation to the view model

* Remove debug message

* Add back the missing context key
* sessions: disable branch picker in folder mode

Keep the new chat branch picker visible when isolation switches to Folder, but disable it until Worktree is selected again. Also add regression coverage for the folder/worktree toggle and keep the disabled picker cursor consistent on hover.

Co-authored-by: Copilot <[email protected]>

* sessions: remove branch picker hover cursor tweak

Keep the branch picker behavior change, but drop the extra disabled hover cursor styling so the PR only contains the intended picker visibility/disabled-state update.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Append repository detail metadata, or fall back to the worktree folder name, in the sessions titlebar widget so active titles render as 'Title · repo (branch/worktree)'.

Also update the sessions layout spec to document the new title format.

Co-authored-by: Copilot <[email protected]>
Lower the sessions sidebar resize floor from 270px to 170px and keep the layout specification in sync with the final sessions app behavior.

Co-authored-by: Copilot <[email protected]>
Some old bad logic here caught up to us
…oggles the checkbox (microsoft#298074)

* Initial plan

* Fix clicking on settings link in bool setting toggles the checkbox

When a settings link is clicked in the description of a bool setting,
the MOUSE_DOWN handler was checking if `e.target.tagName === 'a'` to
avoid toggling the checkbox. However, settings links rendered by the
markdown renderer contain an SVG icon inside the `<a>` tag. Clicking
on the SVG makes `e.target` the SVG element (not the `<a>`), causing
the check to fail and incorrectly toggling the checkbox.

Fix by using `targetElement.closest('a')` which traverses up the DOM
tree to detect clicks within any ancestor `<a>` element.

Co-authored-by: rzhao271 <[email protected]>

* Fix type safety of e.target cast in bool setting MOUSE_DOWN handler

Use `instanceof Element` guard instead of casting to HTMLElement,
since clicks can originate from SVGElement/SVGPathElement. Also guard
against null before calling closest('a').

Co-authored-by: rzhao271 <[email protected]>
Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/102850fa-98da-4c19-b23a-414cbe95323b

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: rzhao271 <[email protected]>
…imizations (microsoft#307715)

* Agent Debug Panel: pagination, incremental filtering, and service optimizations

* update

* feedback update
Remember last browser URL before disposal
* agentHost: Enable local agent host in sessions app

Co-authored-by: Copilot <[email protected]>

* comments

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
From microsoft#304603 since it leads to not rendering parallel edits from Copilot CLI correctly

Co-authored-by: Copilot <[email protected]>
…alShellIntegration.ts to resolve memory leaks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.