google / google/adk-python

adk web: Links in chat responses should open in a new tab

オープン
#4,580 コメント 10 件 リアクション 0 件 担当者 1 名 @wyf7107 に割り当て済み GitHub で見る
needs review web
主要言語
Python
スター
21.5k
フォーク
4k
平均マージ
1日 22時間
マージ済み PR(30日)
31

説明

### 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

1. `adk web --reload_agents`
2. Ask the agent a question that produces a response containing a URL
3. Click the link in the rendered chat message
4. 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 `` elements:

```ts
// Wherever chat message HTML is rendered:
// Add target="_blank" rel="noopener noreferrer" to external
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 / Linux

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。