# open_style_link

> **Function** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/widgets/_links/open_style_link)

Open the URL from a Rich link style on click, if present.

Rich `Style(link=...)` embeds OSC 8 terminal hyperlinks, but Textual's
mouse capture intercepts normal clicks before the terminal can act on them.
By handling the Textual click event directly we open the URL with a single
click, matching the behavior of links in the Markdown widget.

URLs that fail the safety check (e.g. containing hidden Unicode or
homograph domains) are blocked and not opened; the event bubbles and a
warning is logged and displayed as a Textual notification.

On success the event is stopped so it does not bubble further. On failure
(e.g. no browser available in a headless environment) the error is logged at
debug level and the event bubbles normally.

## Signature

```python
open_style_link(
    event: Click,
) -> None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `event` | `Click` | Yes | The Textual click event to inspect. |

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/829909166606f8a9d9571b00da725845bad08da7/libs/cli/deepagents_cli/widgets/_links.py#L17)