Repository navigation
feat(tui): MVP — streaming transcript, editor, footer, inline approvals, Esc cancel - #507
Merged
Merged
Conversation
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
| /// `▸ write_file out.txt`: the tool plus its first short string argument. | ||
| pub fn tool_line(tool: &str, input: &Value) -> String { | ||
| let arg = input | ||
| .as_object() |
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What (description of the change)
TUI MVP (#460, epic #464 Phase 1 core): the tole-tui placeholder becomes a working chat surface.
TuiHostcontract (footer()+ blockingrun_turn(prompt, cancel, observer)+approval_channel()). Design decision (recorded): option (b) — the HOST supplies footer content and runs turns; SessionStatus/WindowSource/ModelsCatalog are CLI-side network-adjacent types and moving them would drag provider concerns into tole-core. tole-tui and tole-core stay UI-free.approval_channel()yields aPrompterwrapped by the CLI asPromptFninside the normalInteractiveApprover— allowlist/--yes/Destructive-always-asks rules unchanged; the prompt renders inline and is answered through the event loop; Esc at a prompt denies and cancels; a dropped/unanswered prompt denies (fail-closed).(turn cancelled)settles visibly).tolenow re-parses as a hiddentole tuisubcommand so it goes through the normal config gate/settings (skeleton's direct dispatch bypassed the gate — fixed, beyond-brief, disclosed).tole resume, listed bysessions --all— asserted in the e2e).Why (the problem you're solving)
Closes #460 — the TUI skeleton had no core loop; this is the everyday-driver surface of the epic (#464): talk to the agent, see what it does, approve/cancel it.
Testing (how you verified this works)
tui_streams_approves_cancels_and_leaves_an_ordinary_session(crates/tole-cli/tests/tui_e2e.rs): real binary under a pty against a scripted mock provider — send prompt -> streamed answer renders, approve a write (artifactout.txtcreated), Esc cancels a running turn ((turn cancelled)), multi-line input, thentole resumesees an ordinary session. Orchestrator re-ran it: 1 passed / 0 failed.[y] allowassertion — then passed).--workspace --all-targets -- -D warningsclean;cargo test --workspace --no-fail-fast1050 passed / 0 failed;cargo test -p tole-core -p tole-cli --no-default-features893 / 0;cargo build -p tole-cli --no-default-featuresOK;cargo build -p tole-cli(default, links TUI) OK.cora review --stagedstatic pass said "No issues found" but its LLM tier hit a 504 — no real local LLM verdict; the CI Cora job is the check for this PR. Uteke rooms: tole-dev / codecoradev-conventions / uteke-conventions read; codecora-workflow-standard listing overflowed (AGENTS.md fallback). Real-TTY feel (exact rendering, keybinding edge cases on odd terminals) remains human-verify territory per docs/tui.md.