Chat input widget for deepagents-code with autocomplete and history support.
Autocomplete entries derived from COMMANDS for SlashCommandController.
Maps each non-normal mode to its display glyph shown in the prompt/UI.
Maps each non-normal mode to its trigger character.
Pattern for image placeholders with a named id capture group.
Used to extract numeric IDs from placeholder tokens so the tracker can prune stale entries and compute the next available ID.
Pattern for video placeholders with a named id capture group.
Used to extract numeric IDs from placeholder tokens so the tracker can prune stale entries and compute the next available ID.
Return the longest mode prefix and mode for text, if any.
Longer prefixes win so multi-character triggers like !! are matched
before their single-character prefixes (!).
Check whether the terminal is in ASCII charset mode.
Convenience wrapper so widgets can branch on charset without importing
both _detect_charset_mode and CharsetMode.
A single autocomplete entry for the slash-command controller.
Result of handling a key event in the completion system.
Controller for @ file completion with fuzzy matching from project root.
Manages multiple completion controllers, delegating to the active one.
Controller for / slash command completion.
Manages command history with file persistence.
Uses append-only writes for concurrent safety. Multiple agents can safely write to the same history file without corruption.
Track pasted images and videos in the current conversation.
Unified parse result for dropped-path payload detection.
A clickable completion option in the autocomplete popup.
Popup widget that displays completion suggestions as clickable options.
TextArea subclass with custom key handling for chat input.
Chat input widget with prompt, multi-line text, autocomplete, and history.
Features:
config.newline_shortcut)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.