Skip to content

latent.chat.app

Textual-based Chat REPL application.

Thin rendering layer that implements ChatOutput and delegates all business logic to ChatController.

Classes

ChatApp

ChatApp(agent: BaseAgent, session_id: str | None = None)

Interactive chat REPL powered by Textual.

Implements the ChatOutput protocol structurally (no inheritance needed).

Methods

ChatApp.action_cancel

action_cancel() -> None

Handle Ctrl+C — cancel active streaming.

ChatApp.action_quit

action_quit() -> None

ChatApp.clear_display

clear_display() -> None

ChatApp.compose

compose() -> ComposeResult

ChatApp.dismiss_history_picker

dismiss_history_picker() -> None

ChatApp.hide_loading

hide_loading() -> None

ChatApp.log_widget

ChatApp.on_input_submitted

on_input_submitted(event: RTLInput.Submitted) -> None

ChatApp.on_key

on_key(event: Any) -> None

Handle Escape to dismiss the history picker.

ChatApp.on_mount

on_mount() -> None

ChatApp.on_resize

on_resize(event: Any) -> None

VerticalScroll children auto-reflow on resize.

ChatApp.on_session_picker_selected

on_session_picker_selected(event: SessionPicker.Selected) -> None

ChatApp.show_history_picker

show_history_picker(sessions: list[SessionInfo]) -> None

ChatApp.show_loading

show_loading() -> None

ChatApp.write_assistant_complete

write_assistant_complete(text: str) -> None

ChatApp.write_assistant_text

write_assistant_text(text: str) -> None

ChatApp.write_error

write_error(message: str) -> None

ChatApp.write_info

write_info(text: str) -> None

ChatApp.write_reasoning

write_reasoning(text: str) -> None

ChatApp.write_status

write_status(text: str) -> None

ChatApp.write_tool_call

write_tool_call(name: str, arguments: dict[str, Any], tool_call_id: str) -> None

ChatApp.write_tool_result

write_tool_result(output: Any, error: str | None, tool_call_id: str) -> None

ChatApp.write_user_message

write_user_message(text: str) -> None