Skip to content

[mirror] microsoft/vscode#301896 Fix listener leak in chat inline anchor widgets#789

Open
austindyoung wants to merge 1421 commits intomainfrom
driftfence/mirror/pr-301896/latest
Open

[mirror] microsoft/vscode#301896 Fix listener leak in chat inline anchor widgets#789
austindyoung wants to merge 1421 commits intomainfrom
driftfence/mirror/pr-301896/latest

Conversation

@austindyoung
Copy link
Owner

Automated mirror PR for DriftFence counterfactual telemetry.

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

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

vijayupadya and others added 30 commits March 9, 2026 18:44
…9256)

* otel data source and Import/export

* Handle chat customization events in import/export

* PR feedback updates

* Fix reopen issue

* Simplify and pass core events for export

* Perf optimizations and label changes

* add session title to export/import
…tiger

Sessions: Add "Group by Repository" toggle for sessions list
…rruption (microsoft#298993)

* test: add multiline PTY write test for macOS 1024-byte buffer bug

Adds a test that sends multiline commands of varying sizes (10, 20, 30 lines)
through TerminalProcess.input() and verifies the data arrives intact at the
shell. On macOS, multiline commands exceeding ~1024 bytes corrupt due to PTY
canonical-mode input buffer backpressure.

Reproduces: microsoft#296955

* fix: chunk multiline PTY writes on macOS to avoid 1024-byte buffer corruption

macOS PTY has a ~1024-byte canonical-mode input buffer. When multiline data
(containing CR characters) exceeds this threshold, the shell's line editor
echoes characters back, creating backpressure that corrupts the write.

Write multiline PTY input in 512-byte chunks with 5ms pauses between them
to allow the echo buffer to drain. Non-macOS platforms and single-line
writes are unaffected.

Fixes microsoft#296955

* test: increase large multiline test to 500 lines (~32KB)
Let's see how many callers are out there for this deprecated api
Move `registerChatModelChangeListeners` onto chat service
…eest

Add deprecation message on registerChatSessionItemProvider
…neafowl

Keep `.md` file extension as default extension
* mcp: move to askquestions for elicitations

This reuses the askquestions UI to make elicitation requests. This is a
nicer UX than the quickpick flow.

It adds data validation to askquestions, as required by MCP, and also
switches the answer types from `unknown` to `IChatQuestionAnswerValue`
which is a bit more predictable to manage.

* fic tests

* pr comments
* Enhance quick suggestions behavior with inline completions: allow triggering when inline provider returns no results

* Improve inline completions handling: suppress suggestions when inline completions are active

* CCR
…lude files (microsoft#299583)

* Git - adopt the new package to use copy-on-write for the worktree include files

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>
* Sessions - expose session base branch information

* Pull request feedback
* Add API proposal version check

* CCR feedback

* Test with version bump

* Comment improvements

* Undo test version bump

* More comment improvement
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…lynx

ci and PR review comments in agent feedback
* Rerun the failed API version check

* CCR comments
…#300436)

* refactor: update model management methods to use grouped model picker

* refactor: remove showManageModelsAction parameter from model picker functions

* refactor: streamline model picker item construction and improve readability

* refactor: reorganize model picker logic to support grouped model selection

* refactor: disable showManageModelsAction in NewChatWidget and simplify useGroupedModelPicker logic

* fix: increase viewport max height calculation in ActionList class

* feat: add hover position support to model picker and related components
rebornix and others added 30 commits March 11, 2026 19:22
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fix: Correct comment references to supportedAuthorizationServers field
* import cap and large file optimizations

* feedback updates
* Match vscode shortcuts

* Simplify setting name
…batross

Add continue and rephrase actions to inline chat, enhance session management
* chat rendering fix for working + cli specific issues

* address comments
…soft#300868) (microsoft#301023)

Revert "Using computed editor options instead of direct values  (microsoft#300868)"

This reverts commit 446c755.
…rosoft#301024)

* plugins: support plugin specific paths, adding a plugin directly

- Supports custom fields for commands/skills/agents/etc in plugins,
  matching the new plugins spec.
- Support adding a plugin (without needing a repo) directly via
  'Chat: Install Plugin from Source' in the command palette, installed
  plugins view, or the chat customizations view.

Closes microsoft#300945

* comments
…oach

Make chat sessions give a delta of what has changed
…osoft#301146)

* wiring in options instead of direct values

* fixing the tests

* adding wrapping info

* fixing chat bug
* Add fetch service observability

* Address copilot comments
* Add telemetry to Chat Customizations editor

Instrument 7 key user interactions in the AI Customization Management
Editor with GDPR-compliant publicLog2 telemetry events:

- chatCustomizationEditor.opened: tracks editor opens with initial section
- chatCustomizationEditor.sectionChanged: tracks sidebar navigation
- chatCustomizationEditor.itemSelected: tracks item selection with type/storage
- chatCustomizationEditor.createItem: tracks AI-guided and manual creation
- chatCustomizationEditor.saveItem: tracks save actions (builtin override + existing)
- chatCustomizationEditor.deleteItem: tracks confirmed deletions
- chatCustomizationEditor.search: tracks search usage with result counts

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

* fix: improve search telemetry logging in Chat Customizations editor

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* plugin system: add support for rules ('instructions') from Open Plugin spec

- Adds IAgentPluginInstruction interface and instructions property to IAgentPlugin
  observable stream, following the same pattern as commands/skills/agents
- Implements _readRules() method in agentPluginServiceImpl to discover rule files
  (.mdc, .md, .instructions.md) from the rules/ directory and supplemental paths
  defined in the plugin manifest. Uses longest-match-first suffix stripping to
  correctly derive rule names.
- Wires observeComponent('rules', ...) in _toPlugin() to integrate manifest
  'rules' field configuration with the discovery mechanism
- Adds plugin instructions to the prompt file discovery system via watchPluginPromptFilesForType,
  making instructions available alongside filesystem-discovered instructions
- Includes comprehensive test coverage for rule discovery patterns, suffix stripping,
  deduplication, and reactive observable integration

(Commit message generated by Copilot)

* comments
…ft#301171)

* Add inline hover actions to AI Customization tree items

Add menu-contributable inline action buttons that appear on hover for
file items in the Chat Customization tree view. Actions registered in
the 'inline' menu group appear as icon buttons on hover/focus/selection.

New actions:
- Delete: removes customization file with confirmation dialog
- Copy Path: copies file path to clipboard

Existing actions (Open, Run Prompt) are preserved in context menu and
Open is also shown as an inline hover button.

Follows the standard VS Code pattern used by SCM, Explorer, and other
tree views: ActionBar in tree renderer populated from IMenuService with
the 'inline' group filter.

Fixes part of microsoft#297343

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

* Add inline hover action buttons to Chat Customizations management editor

Add an ActionBar to AICustomizationItemRenderer populated from the
AICustomizationManagementItemMenuId menu's inline group. The Delete
action (trash icon) now appears as a hover button on each list item.

The .item-right container already had CSS opacity transitions for
hover visibility — this commit populates it with menu-driven actions.

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

* Address review feedback: safe delete, non-file URI handling, dedup context menu

- Delete action: guard against non-file URIs, use useTrash + recursive
- Copy Path: fall back to uri.toString() for non-file schemes
- Include storage in tree view renderer context for when-clause filtering
- Fix duplicate Delete in management editor context menu by using
  getContextMenuActions with 'inline' filter instead of getFlatContextMenuActions

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

* Refresh management editor list after file deletions

The list only subscribed to onDidChangeCustomAgents and
onDidChangeSlashCommands, which don't fire for all prompt types.
Subscribe to fileService.onDidFilesChange for deletions so the list
refreshes immediately after using the inline delete button.

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

* reset

---------

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

* Report terminal ID and cwd in runInTerminal tool result

* resolve comment
Move per-widget configurationService.onDidChangeConfiguration listener
to a single listener on the ChatListWidget container. Each
InlineAnchorWidget previously registered its own listener to toggle a
link-style CSS class, causing a listener leak warning when 175+ widgets
existed in a session.

The fix uses a parent container class (chat-inline-references-link-style)
toggled by a single listener, with CSS descendant selectors to style all
child widgets.

Fixes microsoft#301185
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.