Skip to content

Commit 414f2b9

Browse files
authored
Feature/tui improvements (#71)
* refactor: encapsulate turn completion logic into a new ConversationTurn::finish method * chore: ignore .freebuff directory in gitignore * refactor: remove modular TUI components and consolidate UI code into single module * refactor(tui): split the UI into terminal, input, action, state and view modules main.rs was doing five jobs at once — terminal setup, input, key resolution, rendering and cleanup — which is why the tree could not grow. The previous attempt at a modular TUI collapsed into a 1,660-line app.rs before c1f1d38 removed it. Give each responsibility its own module so adding a screen is additive rather than another round of untangling main. - tui.rs owns the terminal. Raw mode, alternate screen, paste and focus modes and the keyboard protocol are switched on in one place and released by one idempotent restore(), reached from Drop, the panic hook and normal shutdown, so a panic or an early return can no longer strand a shell without echo. - event.rs reads input on a dedicated thread and translates it into app events, dropping key releases so the keyboard protocol cannot fire a key twice. - action.rs resolves key presses to named actions, reusing OpenCode's ctrl+x leader and action names so its bindings carry over. Adds ctrl+d and <leader>q. - app.rs is the only place state changes; update() reports whether a repaint is needed, so an idle TUI does no work and a burst of events costs one frame. - ui.rs stays pure, which is what will make a frame reproducible from TestBackend. Renders now run inside a synchronized update so a slow repaint shows one whole frame. Resize repaints explicitly instead of relying on an incidental redraw. * feat: add theme system with generated landing site color palettes * feat: render landing site wordmark and hairline lattice in TUI * feat: add TUI menu, badge, input, and text components with updated view layout * feat: add search filtering and left badge support to menus and terminal guards * refactor: improve key resolution and prompt editing with byte-offset carets and text editing shortcuts * feat: add session management, model selection, and tool execution tracking to TUI * feat(tui): add markdown rendering, diff views, tool grouping, and mouse scroll * feat(tui): load session history on resume and sync session metadata
1 parent 9fbaa8d commit 414f2b9

45 files changed

Lines changed: 6040 additions & 8596 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,11 @@ models.gen.json
5656

5757
.alchemy
5858

59+
.freebuff
60+
opencode.json
61+
5962
# Rust build output (packages/tui binary; the launcher loads the built artifact).
6063
target
64+
65+
# testing
66+
videos

0 commit comments

Comments
 (0)