Skip to content

Add TUI#8

Merged
alpaim merged 6 commits into
mainfrom
tui
Mar 10, 2026
Merged

Add TUI#8
alpaim merged 6 commits into
mainfrom
tui

Conversation

@alpaim
Copy link
Copy Markdown
Owner

@alpaim alpaim commented Mar 10, 2026

Changes Made

1. Cargo.toml

Added TUI dependencies and updated vecbox-core:

  • ratatui = "0.30.0" - Terminal UI framework for building interactive interfaces
  • crossterm = "0.28" - Cross-platform terminal manipulation library
  • Updated vecbox-core from v0.1.0 to v0.1.1

2. src/tui.rs

New TUI module providing an interactive terminal wizard:

  • AppState - Holds server configuration (repo, quant, host, port, pixels settings)
  • Step enum - Wizard steps: Welcome, ModelSelection, QuantSelection, ServerConfig, Summary, Running
  • State - Manages current wizard state and user input
  • run_wizard() - Entry point for interactive configuration wizard
  • Multi-step wizard flow for selecting model, quantization, and server settings
  • Keyboard navigation with arrow keys, Enter to confirm, Esc to go back
  • Live log display when server is running
  • Graceful terminal cleanup on exit (Ctrl+C support)

3. src/cli.rs

Extended CLI with TUI mode:

  • New tui subcommand to launch interactive terminal wizard
  • Refactored argument structure for cleaner command handling

4. src/main.rs

Integrated TUI into application entry point:

  • Routes to run_wizard() when tui subcommand is used
  • Added TUI module declaration

5. src/api/server.rs

Updated for TUI integration:

  • Modified server startup to work with TUI state management
  • Added atomic flag support for graceful server shutdown from TUI

6. src/api/mod.rs

Updated exports for TUI integration

@alpaim alpaim merged commit 6f57df3 into main Mar 10, 2026
@alpaim alpaim deleted the tui branch March 10, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant