Skip to content

feat(vscode): open chat web links in the integrated browser - #14885

Merged
marius-kilocode merged 6 commits into
mainfrom
enable-integrated-agent-manager-links
Oct 7, 2026
Merged

marius-kilocode merged 6 commits into
mainfrom
enable-integrated-agent-manager-links

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Web links in Kilo chat always opened in the system browser, even when the experimental Integrated Browser was enabled. That meant leaving VS Code, and for Agent Manager sessions it broke the in-session context.

Why This Change Was Made

The Integrated Browser can already render public HTTPS pages: the sidebar opens a browser editor tab through BrowserTabProvider, and Agent Manager has a browser side panel, both backed by the shared browser broker. Chat links now route through the host, which selects the destination from a new "Open links in" preference next to the Integrated Browser flag.

  • A single capture handler on each chat view owns web-link clicks, so a click opens exactly one destination and no external browser opens alongside it.
  • The sidebar and editor-tab links use the same broker-backed Integrated Browser tab as Agent Manager, instead of VS Code's Simple Browser.
  • Only http/https links are routed; other schemes keep their default handling.
  • Links that open in-app get a small browser glyph, shown only in a trusted workspace where the host would use the in-app browser.
  • Open chats apply a preference change immediately, and a failure to open in-app falls back to the system browser instead of leaving the link dead.

User Impact

When the experimental Integrated Browser is enabled, chat web links open in-app by default: the sidebar uses the Integrated Browser tab, and Agent Manager uses its browser panel. Choose "System browser" under "Open links in" to opt out. When the flag is off, the workspace is untrusted, or the link is not a web URL, links keep opening in the system browser.

Evidence

Self-tested in an isolated VS Code instance (sidebar and Agent Manager, separate sessions):

  • A sidebar Markdown link and an inline-code link each opened only the Integrated Browser tab at the target URL.
  • The same links in Agent Manager opened only its browser side panel.
  • A non-resolving URL stayed in the selected browser and never opened a second browser.
  • Switching "Open links in" to System browser updated both already-open chats without a reload.
  • In an untrusted workspace the glyph is hidden and links open externally.
  • Saved settings survived a full restart.

Automated: bun run typecheck, extension typecheck/lint, knip, the kilocode_change annotation check, and the full unit suite pass.

Screenshots

"Open links in" sits next to the Integrated Browser toggle and defaults to Integrated Browser:

Open links in setting defaulting to Integrated Browser

A sidebar chat link shows a browser glyph and opens in the Integrated Browser editor tab instead of the system browser:

Sidebar chat link opening in the Integrated Browser tab

Browser glyph on a chat web link

Add an "Open links in" setting next to the Integrated Browser flag. When
the experimental Integrated Browser is enabled, chat web links open in-app
by default: the sidebar uses a browser editor tab and Agent Manager uses
its browser panel. Users can opt out with "System browser".

Intercept web-link clicks in one capture handler per chat view so a click
opens a single destination, including links inside reasoning and tool
output. Show a browser glyph on in-app links, and update open chats
immediately when the preference changes.
@kilo-code-bot

kilo-code-bot Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The prior suggestion on BrowserTabProvider.ts (chat-link error state omitting missing) is resolved by the new diagnostic(error, url) + missing payload, which now matches the shared in-panel path so the tab renders the install/retry/settings card.

Files Reviewed (1 file)
  • packages/kilo-vscode/src/browser-tab/BrowserTabProvider.ts
Previous Review Summaries (4 snapshots, latest commit aab7f87)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit aab7f87)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-vscode/src/browser-tab/BrowserTabProvider.ts 164 New chat-link error state omits missing, so the no-Chromium case shows a bare error overlay without the install/retry/settings card the in-panel path renders.
Resolution of previous findings
  • webview-ui/src/App.tsx Agent Manager in-app link workspace-trust warning: fixed by the added config.settings().workspaceTrusted === true guard, which now lets untrusted links fall through to external open.
  • BrowserTabProvider.ts async browser.open dead-link suggestion: fixed by the new error handler that posts browserTab.state to the panel.
Files Reviewed (2 files)
  • packages/kilo-vscode/src/browser-tab/BrowserTabProvider.ts - 1 issue
  • packages/kilo-vscode/webview-ui/src/App.tsx - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit d24f76d)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/webview-ui/src/App.tsx 184 Agent Manager in-app link branch ignores workspace trust and has no external fallback, so chat links dead-click in an untrusted workspace.

SUGGESTION

File Line Issue
packages/kilo-vscode/src/browser-tab/BrowserTabProvider.ts 160 Async browser.open rejection is only logged after openUrl already returned true, leaving the chat link dead.
Files Reviewed (11 files)
  • packages/kilo-vscode/src/KiloProvider.ts
  • packages/kilo-vscode/src/browser-links.ts
  • packages/kilo-vscode/src/browser-tab/BrowserTabProvider.ts
  • packages/kilo-vscode/src/extension.ts
  • packages/kilo-vscode/src/kilo-provider/chat-settings.ts
  • packages/kilo-vscode/src/kilo-provider/editor-actions.ts
  • packages/kilo-vscode/tests/unit/browser-links.test.ts
  • packages/kilo-vscode/tests/unit/chat-settings-message.test.ts
  • packages/kilo-vscode/webview-ui/src/App.tsx
  • packages/kilo-vscode/webview-ui/src/context/config.tsx
  • packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts

Fix these issues in Kilo Cloud

Previous review (commit 18ead3a)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 2
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/src/browser-links.ts 24 Sidebar path opens VS Code's Simple Browser (simpleBrowser.api.open), not Kilo's Integrated Browser used by the Agent Manager path and referenced by the setting/glyph. Confirm intended destination.

SUGGESTION

File Line Issue
packages/kilo-vscode/src/browser-links.ts 27 No fallback to openExternal if the in-app command is unavailable, so the link dead-ends (small regression vs. prior behavior).
packages/kilo-vscode/webview-ui/src/App.tsx 248 In-app link glyph ignores workspace trust; host opens externally when untrusted while the glyph still implies in-app.
Files Reviewed (3 files)
  • packages/ui/src/context/data.tsx - incremental diff: kilocode_change annotation only, no functional change
  • packages/kilo-vscode/src/browser-links.ts - 2 issues (re-verified, unchanged since prior review)
  • packages/kilo-vscode/webview-ui/src/App.tsx - 1 issue (re-verified)

Fix these issues in Kilo Cloud

Previous review (commit 0abb254)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 2
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/src/browser-links.ts 24 Sidebar path opens VS Code's Simple Browser (simpleBrowser.api.open), not Kilo's Integrated Browser used by the Agent Manager path and referenced by the setting/glyph. Confirm intended destination.

SUGGESTION

File Line Issue
packages/kilo-vscode/src/browser-links.ts 27 No fallback to openExternal if the in-app command is unavailable, so the link dead-ends (small regression vs. prior behavior).
packages/kilo-vscode/webview-ui/src/App.tsx 248 In-app link glyph ignores workspace trust; host opens externally when untrusted while the glyph still implies in-app.
Files Reviewed (40 files)
  • packages/kilo-vscode/src/browser-links.ts - 2 issues
  • packages/kilo-vscode/src/kilo-provider/chat-settings.ts - reviewed
  • packages/kilo-vscode/src/kilo-provider/editor-actions.ts - reviewed
  • packages/kilo-vscode/src/services/browser-automation/chrome-setting.ts - reviewed
  • packages/kilo-vscode/src/KiloProvider.ts - reviewed
  • packages/kilo-vscode/webview-ui/src/App.tsx - 1 issue
  • packages/kilo-vscode/webview-ui/src/components/chat/ChatView.tsx - reviewed
  • packages/kilo-vscode/webview-ui/src/components/settings/ExperimentalTab.tsx - reviewed
  • packages/kilo-vscode/webview-ui/src/components/settings/CustomProviderDialog.tsx - reviewed
  • packages/kilo-vscode/webview-ui/src/components/settings/ProviderConnectDialog.tsx - reviewed
  • packages/kilo-vscode/webview-ui/src/context/config.tsx - reviewed
  • packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts - reviewed
  • packages/kilo-vscode/webview-ui/src/types/messages/webview-messages.ts - reviewed
  • packages/kilo-vscode/tests/unit/browser-links.test.ts - reviewed
  • packages/kilo-vscode/tests/unit/chat-settings-message.test.ts - reviewed
  • packages/kilo-ui/src/components/markdown.css - reviewed
  • packages/ui/src/context/data.tsx - reviewed
  • packages/kilo-vscode/package.json - reviewed
  • .changeset/integrated-browser-open-links.md - reviewed
  • 21 i18n locale files (ar..zht) - reviewed

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 58.8K · Output: 9.1K · Cached: 702.1K

Review guidance: REVIEW.md from base branch main

The sidebar used VS Code's Simple Browser while Agent Manager used Kilo's
Integrated Browser, so the same setting opened two different browsers. Route
sidebar and editor-tab links through BrowserTabProvider, the same broker-backed
Integrated Browser tab the Agent Manager panel uses.

Fall back to the system browser when the in-app opener cannot take the link,
and gate the in-app glyph on workspace trust so it matches the host decision.
Gate the Agent Manager in-app link route on workspace trust so an untrusted
workspace falls back to the external opener instead of a rejected message.

Report an early Integrated Browser navigation failure in the tab, matching the
in-panel error state, instead of leaving the link silently unopened.
@marius-kilocode
marius-kilocode merged commit 3d48d99 into main Oct 7, 2026
35 checks passed
@marius-kilocode
marius-kilocode deleted the enable-integrated-agent-manager-links branch October 7, 2026 10:20
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.

2 participants