Files
codewhale/src/ui.rs
T
Hunter Bown 6f1158a2d7 Initial release v0.1.0
DeepSeek TUI - Unofficial terminal UI + CLI for DeepSeek models.

Features:
- Interactive TUI with multiple modes (Normal, Plan, Agent, YOLO, RLM, Duo)
- Comprehensive tool access with approval gating
- File operations, shell execution, task management
- Sub-agent system for parallel work
- MCP integration for external tool servers
- Session management and skills system
- Cross-platform support (macOS, Linux, Windows)

🤖 Generated with [Claude Code](https://claude.ai/code)
2026-01-20 08:57:35 -06:00

31 lines
974 B
Rust

//! Terminal UI helpers (progress bars, spinners).
use indicatif::{ProgressBar, ProgressStyle};
/// Create a spinner progress indicator.
#[must_use]
#[allow(dead_code)]
pub fn spinner(message: &str) -> ProgressBar {
let spinner = ProgressBar::new_spinner();
spinner.set_message(message.to_string());
spinner.set_style(
ProgressStyle::with_template("{spinner} {msg}")
.unwrap_or_else(|_| ProgressStyle::default_spinner()),
);
spinner.enable_steady_tick(std::time::Duration::from_millis(120));
spinner
}
/// Create a progress bar for byte-based transfers.
#[must_use]
#[allow(dead_code)]
pub fn progress_bar(total: u64, message: &str) -> ProgressBar {
let bar = ProgressBar::new(total);
bar.set_message(message.to_string());
bar.set_style(
ProgressStyle::with_template("{msg} [{bar:40.cyan/blue}] {bytes}/{total_bytes} ({eta})")
.unwrap_or_else(|_| ProgressStyle::default_bar()),
);
bar
}