Skip to content

[Feature]: Desktop: right-click a link in a message to open it in the app browser pane, and let the agent work on that page #182

Backlog

Description

@magicprinc

Problem

Desktop has a browser pane, but an http(s) link in a message leaves the app. Clicking it opens an "Open external link?" confirmation ("You're about to visit an external website.") with Close, Copy link and Open link; Open link then hands the URL to the system browser. There is no context menu offering the in-app browser.

So following a docs page, an issue or a PR pulls the reader out of the app, and the agent is no longer beside the page being asked about. The same applies to links in tool output, the terminal pane and the composer.

Proposal

  1. Link context menu in messages (assistant text, tool output, composer chips, terminal output): Open in app browser, Open in system browser, Copy link, Copy as Markdown. The entry that opens the app browser is the default, so a plain click keeps the work inside the app.
  2. A setting for plain clicks: "open links in: app browser / system browser". Ctrl/Cmd+click opens in the other one, which keeps the current habit available.
  3. Pane behaviour: reuse the tab that already shows the same URL, otherwise open a new one, give it focus, and keep the address visible and editable, so the URL is not a dead end.
  4. Hand the page to the agent. From the same menu: Ask the agent about this page and Attach page to session. The page (URL, title, and on request its visible text or a screenshot) lands in the composer as context for the next message; it is not sent on its own. In the other direction, the agent should be able to act on the open page (read it, click, fill, scroll) through a normal tool call with the same approval step used for other writes, so nothing happens on a page silently.
  5. Mods: respect whatever link-handler seam mods already expose. A link a mod claims should appear in the menu as that mod's action, with the app-browser entry still available.

Notes

  • Opening the pane from a link is the small part; the value is that the page and the session share one window, so "summarise this page", "find the button", "fill this form" do not need a copy-paste round trip.
  • The pane should keep its own cookie jar, warn on http, and never put page content into the model context without the explicit attach action.
  • The menu entry can be hidden when the build has no browser pane, so nothing dead appears.

Acceptance criteria

  • Right-clicking a link in an assistant message offers the four entries, and "Open in app browser" opens the URL in the existing browser pane.
  • The setting switches the plain-click target and Ctrl/Cmd+click does the opposite.
  • "Attach page to session" puts the URL and title into the composer without sending a message.

Environment

Command Code Desktop 0.1.63, Windows 10 (build 19045) x64.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions