Override the startup splash subheader text when set.
Hide local path displays in the TUI footer and startup splash when enabled.
Hide LangSmith tracing project/thread info in the startup splash when enabled.
Hide rotating tips in the startup splash when enabled.
Hide version and local-install details in the splash screen when enabled.
Return whether env var name is set to a recognizably truthy value.
Unlike bool(os.environ.get(name)), this does not treat "0" or
"false" as enabled. Use this for on/off flags where the user would
reasonably expect VAR=0 to mean "disabled".
Fetch the LangSmith project URL via the LangSmith client.
Successful results are cached at module level so repeated calls do not make additional network requests.
The network call runs in a daemon thread with a hard timeout of
_LANGSMITH_URL_LOOKUP_TIMEOUT_SECONDS, so this function blocks the
calling thread for at most that duration even if LangSmith is unreachable.
Returns None (with a debug log) on any failure: missing langsmith package,
network errors, invalid project names, client initialization issues,
or timeouts.
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_CODE_LANGSMITH_PROJECT), then LANGSMITH_PROJECT from the
environment (note: this may already have been overridden at bootstrap time
to match DEEPAGENTS_CODE_LANGSMITH_PROJECT), then 'deepagents-code'.
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.
Build a footer shown while waiting for the server to connect.
Build the footer shown at the bottom of the welcome banner.
Includes a tip to help users discover features unless tips are disabled.
Welcome banner displayed at startup.
LangChain brand colors and semantic constants for the app.
Single source of truth for color values used in Python code (Rich markup,
Content.styled, Content.from_markup). CSS-side styling should reference
Textual CSS variables: built-in variables
($primary, $background, $text-muted, $error-muted, etc.) are set via
register_theme() in DeepAgentsApp.__init__, while the few app-specific
variables ($mode-bash, $mode-command, $mode-incognito, $skill,
$skill-hover, $tool, $tool-hover) are backed by these constants via
App.get_theme_variable_defaults().
Code that needs custom CSS variable values should call
get_css_variable_defaults(dark=...). For the full semantic color palette, look
up the ThemeColors instance via get_registry().
Users can define custom themes in ~/.deepagents/config.toml under
[themes.<name>] sections. Each new theme section must include label (str);
dark (bool) defaults to False if omitted (set to True for dark themes).
Color fields are optional and fall back to the built-in dark/light palette based
on the dark flag. Sections whose name matches a built-in theme override its
colors without replacing it. See _load_user_themes() for details.