-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
needs review[Status] The PR/issue is awaiting review from the maintainer[Status] The PR/issue is awaiting review from the maintainerweb[Component] This issue will be transferred to adk-web[Component] This issue will be transferred to adk-web
Description
Description
When the agent responds with a URL in adk web, clicking it navigates away
from the chat — the user loses their conversation. Links rendered in chat
messages should open in a new browser tab.
Steps to reproduce
adk web --reload_agents- Ask the agent a question that produces a response containing a URL
- Click the link in the rendered chat message
- The browser navigates away from the ADK web UI — the conversation is lost
Expected behavior
External links (http://… / https://…) in chat responses should open in a
new tab (target="_blank") with rel="noopener noreferrer".
Suggested fix
In the Angular web UI component that renders chat messages, add
target="_blank" and rel="noopener noreferrer" to auto-linked URLs.
For example, if links are rendered via Angular's markdown/HTML binding, a
directive or pipe could post-process <a> elements:
// Wherever chat message HTML is rendered:
// Add target="_blank" rel="noopener noreferrer" to external <a> tags
Workaround
We're currently injecting a MutationObserver script into
google/adk/cli/browser/index.html post-install that patches links as they
appear in the DOM. This works but has to be re-applied after every
pip install.
Environment
- adk-python version: latest (pip)
- Browser: Chrome / Safari / Firefox (all affected)
- OS: macOS / LinuxReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs review[Status] The PR/issue is awaiting review from the maintainer[Status] The PR/issue is awaiting review from the maintainerweb[Component] This issue will be transferred to adk-web[Component] This issue will be transferred to adk-web