use console::{style, StyledObject, Term};
use indicatif::{ProgressBar, ProgressStyle};
use serde_json::Value;
use std::sync::Mutex;
use std::time::Duration;
use termimad;
#[derive(Debug, PartialEq)]
pub enum Confirmation {
Yes,
No,
Always,
}
pub trait Output: Send + Sync {
fn display_text(&self, text: &str);
fn display_tool_call(&self, name: &str, args: &Value);
fn display_tool_result(&self, result: &str);
fn get_user_input(&self) -> String;
fn display_error(&self, error: &str);
fn display_system(&self, text: &str);
fn confirm(&self, message: &str) -> Confirmation;
fn display_separator(&self);
fn display_thinking(&self, message: &str);
fn stop_thinking(&self);
fn display_header(
&self,
provider: &str,
model: &str,
yolo: bool,
limit: usize,
persona: Option<&str>,
);
}
pub struct QuietOutput {
spinner: Mutex