Add Velaria Agent TUI#58
Conversation
678e96a to
cfefb13
Compare
c657112 to
b247f1b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b247f1b12f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| async for event in controller.send_turn(args.print_prompt or ""): | ||
| if event.type == "assistant_text" and event.content: | ||
| chunks.append(event.content) | ||
| return "".join(chunks) |
There was a problem hiding this comment.
Propagate failed agent turns from --print
When the Codex or Claude adapter reports a runtime/auth/tool failure, it yields an error or turn.failed event instead of raising; this loop only collects assistant_text, then run_agent_print always prints the accumulated text and returns 0. In scripted velaria_cli.py agent --print ... usage, a failed turn can therefore appear as a successful empty or partial answer, so callers cannot detect or retry the failure.
Useful? React with 👍 / 👎.
| pass | ||
|
|
||
|
|
||
| class ModelSelectScreen(ModalScreen[str | None]): |
There was a problem hiding this comment.
Make the missing-Textual fallback importable
If a user has not run the updated Python dependency sync yet, importing Textual raises ModuleNotFoundError, the fallback assigns ModalScreen = _MissingWidget, and this class definition immediately evaluates ModalScreen[str | None]. _MissingWidget is not subscriptable, so tui_app raises TypeError during import before run_tui can show its intended “requires Textual” message, causing the new default CLI entry to crash in exactly the unsynced environment this fallback is meant to handle.
Useful? React with 👍 / 👎.
Summary
-icompatibility, headless--print/--stream-json, and--modeloverrides.financeCLI registration frommainwhile rebasing the PR to TUI-only scope.Scope
cfefb13Add Velaria Agent TUI.auto/velaria-agent-tui-with-float32.Validation
uv run --project python python -m unittest python.tests.test_agent_cli python.tests.test_python_cli_contract python.tests.test_ai_runtime_agentbazel test //python:agent_cli_test //python:python_cli_contract_test //python:ai_runtime_agent_testuv run --project python python python/velaria_cli.py --helpuv run --project python python python/velaria_cli.py agent --helpuv run --project python python python/velaria_cli.py(non-TTY structured error path)git diff --check origin/main...HEADNote
python.tests.test_claude_runtimewas not included in the final validation because it currently fails on this checkout with a pre-existing fakeclaude_agent_sdkmodule lacking__file__; this is outside the TUI-only diff.