Skip to content

Refactor browser chat integration to use contributions#302936

Merged
kycutler merged 2 commits intomainfrom
kycutler/browsereditorcontrib
Mar 18, 2026
Merged

Refactor browser chat integration to use contributions#302936
kycutler merged 2 commits intomainfrom
kycutler/browsereditorcontrib

Conversation

@kycutler
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 18, 2026 18:18
@vs-code-engineering
Copy link
Contributor

vs-code-engineering bot commented Mar 18, 2026

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@jruales

Matched files:

  • src/vs/workbench/contrib/browserView/electron-browser/browserEditor.ts
  • src/vs/workbench/contrib/browserView/electron-browser/browserEditorChatIntegration.ts
  • src/vs/workbench/contrib/browserView/electron-browser/browserView.contribution.ts
  • src/vs/workbench/contrib/browserView/electron-browser/browserViewActions.ts

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the integrated browser’s chat-related functionality (element selection + console log attachment) out of the core BrowserEditor/actions file and into a dedicated editor “contribution”, to better separate concerns and centralize chat integration logic.

Changes:

  • Removes the “Add Element to Chat” / “Add Console Logs to Chat” actions from browserViewActions.ts and registers them from a new chat integration module.
  • Introduces a BrowserEditorContribution pattern and a contribution registry on BrowserEditor to manage model-scoped lifecycles.
  • Extracts reusable element-formatting helpers into platform/browserElements/common/browserElements.ts.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/vs/workbench/contrib/browserView/electron-browser/browserViewActions.ts Removes chat-related browser actions now handled by the new integration module.
src/vs/workbench/contrib/browserView/electron-browser/browserView.contribution.ts Ensures the new chat integration module is loaded/registered.
src/vs/workbench/contrib/browserView/electron-browser/browserEditorChatIntegration.ts Adds the contribution implementing element selection + chat attachments + console log attachments.
src/vs/workbench/contrib/browserView/electron-browser/browserEditor.ts Adds contribution infrastructure and model lifecycle eventing; removes inlined chat integration logic.
src/vs/platform/browserElements/common/browserElements.ts Adds shared helpers for building element context text (path/map/context formatting).

You can also share your feedback on Copilot code review. Take the survey.

@kycutler kycutler marked this pull request as draft March 18, 2026 18:32
@kycutler kycutler marked this pull request as ready for review March 18, 2026 18:47
@kycutler kycutler enabled auto-merge (squash) March 18, 2026 19:42
@kycutler kycutler merged commit 2687d4c into main Mar 18, 2026
19 checks passed
@kycutler kycutler deleted the kycutler/browsereditorcontrib branch March 18, 2026 19:48
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.

3 participants