Enter to send·Shift+Enter new line
ChatTextArea( self, kwargs: Any = {}, )
PasteBurstTextArea
Shared key bindings for every paste-aware text area.
Inline slash-command argument hint rendered at the end of the line.
Enable or disable shell syntax highlighting for this text area.
Keep an open prompt search focused when the composer is clicked.
Highlight the active line whenever the chat input contains a newline.
Return one input line, with shell syntax styles when enabled.
Render a single line, appending any argument hint at line end.
The built-in TextArea.suggestion renders at the cursor position, but slash-command argument hints should stay attached to the end of the command text regardless of cursor movement.
TextArea.suggestion
Scroll to make the cursor visible, guarding against cursor/document desync.
Textual's WrappedDocument.location_to_offset has an off-by-one in its line-index clamp (len(...) instead of len(...) - 1). When a reactive watcher (e.g. _watch_show_vertical_scrollbar) fires between a document replacement and cursor update, the stale cursor location triggers a ValueError. Guard here since scroll_cursor_visible is the sole caller of _recompute_cursor_offset.
WrappedDocument.location_to_offset
len(...)
len(...) - 1
_watch_show_vertical_scrollbar
ValueError
scroll_cursor_visible
_recompute_cursor_offset
Set whether the app should show the cursor as active.
Set whether completion suggestions are visible.
Insert a newline character.
Move cursor up, or navigate to the previous history entry at top.
When select is true or a selection is active, falls through to TextArea's default so shift+up extends selection rather than triggering navigation. History fires only when moving up cannot advance the cursor — handled via the wrapped-document navigator so soft-wrap is respected.
select
Move cursor down, or navigate to the next history entry at bottom.
Mirrors action_cursor_up: defers to TextArea on selection or when the cursor still has somewhere to move; otherwise fires history.
action_cursor_up
Delete a bound placeholder atomically or the next character.
Delete a bound placeholder atomically or the previous word.
Replace a [Pasted text #id] placeholder with full text in place.
[Pasted text #id]
Used when the same content is pasted again: the compact placeholder is expanded back to the original text where it sits, preserving surrounding input.
Set text from history navigation.
Move the cursor to the end of the current text.
Clear the text area.
Clear the draft via an undoable edit (restorable with ctrl+z).
Unlike clear_text, the deletion is recorded in the undo history and the resulting Changed event is allowed to propagate, so completion and argument-hint state stay in sync.
clear_text
Changed
Message sent when text is submitted.
Request previous history entry.
Request next history entry.
Posted when the user presses a printable key or backspace.
Relayed by ChatInput as ChatInput.Typing for the app to track typing activity.
ChatInput
ChatInput.Typing
TextArea subclass with custom key handling for chat input.
Modifier-Enter / Ctrl+J newline bindings and the VSCode backslash+enter fallback are inherited from PasteBurstTextArea.