Message widgets for deepagents-cli.
App color scheme.
Maps each non-normal mode to its trigger character.
Pattern to detect email-like text preceding an @ symbol.
If the character immediately before @ matches this pattern, the @mention
is likely part of an email address (e.g., user@example.com) rather than
a file reference.
Pattern for highlighting @mentions and /commands in rendered
user messages.
Matches either:
/help)@file mentions anywhere in the text (e.g., @README.md)Note: The ^ anchor matches start of string, not start of line. The consumer
in UserMessage.compose() additionally checks start == 0 before styling
slash commands, so a / mid-string is not highlighted.
Get the glyph set for the current charset mode.
Format tool calls for display with tool-specific smart formatting.
Shows the most relevant information for each tool type rather than all arguments.
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.
Format a unified diff with line numbers and colors.
Character set mode for TUI display.
Result of formatting tool output for display.
Widget displaying a user message.
Widget displaying a queued (pending) user message in grey.
This is an ephemeral widget that gets removed when the message is dequeued.
Widget displaying an assistant message with markdown support.
Uses MarkdownStream for smoother streaming instead of re-rendering the full content on each update.
Widget displaying a tool call with collapsible output.
Tool outputs are shown as a 3-line preview by default. Press Ctrl+E to expand/collapse the full output. Shows an animated "Running..." indicator while the tool is executing.
Widget displaying a diff with syntax highlighting.
Widget displaying an error message.
Widget displaying an app message.