Confirmation modal for /install <package> --package in the TUI.
Arbitrary packages have no curated allowlist to vet against, so installing
one pulls in third-party code. Rather than forcing the user to re-run with
--force, this non-blocking modal asks for explicit confirmation before the
install runs. --force (or --yes) still bypasses the prompt.
Return whether the style under the mouse points to a clickable link.
Detects both Rich Style(link=...) (OSC 8) hyperlinks and the
@click=link(...) meta actions that Textual's Markdown widget attaches
to rendered links and images.
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 and, unless
the user has opted out, a best-effort informational toast reports the URL
that was opened. If the browser cannot be launched -- either
webbrowser.open raises or the backend declines and returns a falsy value
-- a warning toast with the URL is shown so it can be copied manually, the
failure is logged, and the event bubbles normally.
Confirmation overlay for installing an arbitrary --package.
Dismisses with True when the user confirms and False when the user
cancels. Esc is treated as cancel so the user is never forced into an
install they did not explicitly choose.
Confirmation overlay for installing a model provider's extra.
Shown from the model selector when the user picks a model whose provider
integration package is not installed. Dismisses with True to install and
False to cancel; Esc cancels so the user is never forced into an install.