1 Commits

Author SHA1 Message Date
hamza.khyari 652769c46c feat(tui): wire normal text input to LLM via A2A facade
CI / push-validation (pull_request) Successful in 31s
CI / helm (pull_request) Successful in 42s
CI / build (pull_request) Successful in 42s
CI / lint (pull_request) Successful in 1m6s
CI / quality (pull_request) Successful in 1m6s
CI / typecheck (pull_request) Successful in 1m12s
CI / security (pull_request) Successful in 1m25s
CI / integration_tests (pull_request) Successful in 3m17s
CI / unit_tests (pull_request) Successful in 4m37s
CI / docker (pull_request) Successful in 1m26s
CI / coverage (pull_request) Successful in 11m50s
CI / status-check (pull_request) Successful in 5s
Wires the TUI normal text input path to the LLM via A2aLocalFacade,
closing the gap where typing a message produced no LLM call. All
infrastructure (facade, SessionWorkflow, ProviderRegistry) already
existed in the CLI; this PR adds the TUI wiring on top.

Key changes:
- _run_llm_dispatch(): module-level, Textual-free dispatch function
  covering all domain exception paths with user-friendly messages
- _format_worker_outcome(): testable worker result/error translator
- _create_tui_session(): DB-backed session with persona actor binding
- _build_tui_facade(): wired A2aLocalFacade + SessionWorkflow singleton
- run_worker(thread=True, exclusive=True): non-blocking, serialised
- _dispatch_gen counter: prevents cancelled worker callbacks from
  corrupting the multi-turn transcript
- SessionView.transcript: accumulated conversation history, pre-escaped
- Markup escaping: _escape() applied before transcript storage
- on_mount focus: prompt.focus() so keyboard input is received

Tests: 18 BDD scenarios + 6 Robot Framework integration tests with
FakeListLLM (no real API keys required).

ISSUES CLOSED: #11230
2026-05-22 15:12:04 +00:00