Welcome banner widget for deepagents-cli.
Fetch the LangSmith project URL via the LangSmith client.
Results are cached at module level so repeated calls do not make additional network requests. Failed lookups are also cached to avoid retries.
This is a blocking network call on the first invocation. In async
contexts, run it in a thread (e.g. via asyncio.to_thread).
Returns None (with a debug log) on any expected failure: missing
langsmith package, network errors, invalid project names, or client
initialization issues.
Get the appropriate banner for the current charset mode.
Get the glyph set for the current charset mode.
Resolve the LangSmith project name if tracing is configured.
Checks for the required API key and tracing environment variables.
When both are present, resolves the project name with priority:
settings.deepagents_langchain_project (from
DEEPAGENTS_LANGSMITH_PROJECT), then LANGSMITH_PROJECT from the
environment (note: this may already have been overridden at import
time to match DEEPAGENTS_LANGSMITH_PROJECT), then 'default'.
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.
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.