Textual widgets for deepagents-code.
Import directly from submodules, e.g.:
from deepagents_code.widgets.chat_input import ChatInput
from deepagents_code.widgets.messages import AssistantMessageWelcome banner widget.
Message store for virtualized chat history.
This module provides data structures and management for message virtualization, allowing the TUI to handle large message histories efficiently by keeping only a sliding window of widgets in the DOM while storing all message data as lightweight dataclasses.
The approach is inspired by Textual's Log widget, which only keeps N lines
in the DOM and recreates older ones on demand.
Interactive thread selector screen for /threads command.
Ask user widget for interactive questions during agent execution.
Interactive agent selector screen for /agents command.
Notification center modal for pending actionable notices.
Surfaces a list of PendingNotification entries as single-line rows.
Selecting a row drills into a dedicated detail modal
(UpdateAvailableScreen for update entries, NotificationDetailScreen
otherwise) stacked on top of the center. When the detail modal
dismisses with any non-SUPPRESS action the center dismisses with a
NotificationActionResult so the app layer can dispatch; SUPPRESS is
handled in place via NotificationSuppressRequested so the remaining
notifications stay reachable. When the detail cancels, the center
stays open on the list.
Loading widget with animated spinner for agent activity.
Tool renderers for approval widgets - registry pattern.
TUI screens for managing stored model-provider credentials.
AuthPromptScreen accepts an API key for a single provider, persists it via
auth_store, and is the sole place that deletes existing credentials (after
a DeleteCredentialConfirmScreen confirmation). AuthManagerScreen lists
known providers and routes the user into the prompt; it does not delete
directly. Both are reachable via the /auth slash command.
Security notes:
password=True so the key is never echoed to
the terminal.notify()
payloads, and never round-trips it through Rich markup. Callers that
introduce new logging here must do the same.Read-only MCP server and tool viewer modal.
Approval widget for HITL - using standard Textual patterns.
Dedicated modal for the update-available notification.
Shown automatically at startup when a newer version of
deepagents-code is available on PyPI. Surfaces the same actions the
notification center would offer for the update entry but with a
focused, single-purpose presentation instead of the generic
notification list.
In-TUI MCP OAuth login modal.
MCPLoginScreen is both a Textual ModalScreen and an implementation of
OAuthInteraction. The login worker awaits its interaction methods while
the user sees and acts on the modal's widgets — authorize URLs become
clickable links, paste-back callback URLs go through an inline input row,
device-code instructions render inline, and the modal closes itself on
success.
The screen runs on the Textual event loop (same loop as the worker), so
methods called from the worker can await modal-bound futures directly
without app.call_from_thread.
Enhanced diff widget for displaying unified diffs.
Notification settings screen for /notifications command.
Tool-specific approval widgets for HITL display.
Interactive theme selector screen for /theme command.
Chat input widget for deepagents-code with autocomplete and history support.
Autocomplete system for @ mentions and / commands.
This is a custom implementation that handles trigger-based completion for slash commands (/) and file mentions (@).
Status bar widget.
Onboarding screens for the interactive TUI.
Confirmation modal shown after a successful MCP login.
Restarting the LangGraph server is required for newly minted MCP tokens to take effect, but auto-restarting interrupts users who want to authenticate against several MCP servers back-to-back. This modal lets the user choose between restarting now and deferring until later.
Command history manager for input persistence.
Generic detail modal for a single pending notification.
Used by NotificationCenterScreen when the user drills into an entry
whose payload does not have a dedicated modal (e.g. missing-dependency
notices). Update-available notifications continue to use
UpdateAvailableScreen, which adds a changelog row on top of the
action list.
Dismisses with the selected ActionId, or None on Esc.
Interactive model selector screen for /model command.
Progress modal for app self-update installs.
Message widgets.