Execute a task with output directed to Textual UI.
This is the Textual-compatible version of execute_task() that uses the TextualUIAdapter for all UI operations.
execute_task_textual(
user_input: str,
agent: Any,
assistant_id: str | None,
session_state: Any,
adapter: TextualUIAdapter,
backend: Any = None,
image_tracker: MediaTracker | None = None,
context: CLIContext | None = None,
*,
sandbox_type: str | None = None,
message_kwargs: dict[str, Any] | None = None,
turn_stats: SessionStats | None = None
) -> SessionStats| Name | Type | Description |
|---|---|---|
user_input* | str | The user's input message |
agent* | Any | The LangGraph agent to execute |
assistant_id* | str | None | The agent identifier |
session_state* | Any | Session state with auto_approve flag |
adapter* | TextualUIAdapter | The TextualUIAdapter for UI operations |
backend | Any | Default: NoneOptional backend for file operations |
image_tracker | MediaTracker | None | Default: NoneOptional tracker for images |
context | CLIContext | None | Default: NoneOptional |
sandbox_type | str | None | Default: NoneSandbox provider name for trace metadata, or |
message_kwargs | dict[str, Any] | None | Default: NoneExtra fields merged into the stream input message
dict (e.g., |
turn_stats | SessionStats | None | Default: NonePre-created When the caller holds a reference to the same object, stats are available even if this coroutine is cancelled before it can return. If |