procyon 0.0.1

Terminal development harness for Stellar and Soroban smart contracts, driven by a language model
use crate::config::Provider;
use tokio::sync::mpsc;

#[derive(Debug)]
pub enum UserCommand {
    SendPrompt(String),
    Quit,
    SetExplain(bool),
    // Sent once project switching is wired to a command (Sprint 2.1).
    #[allow(dead_code)]
    ChangeProject(String),
    SwitchModel {
        provider: Provider,
        model: String,
    },
}

#[derive(Debug)]
pub enum AgentUpdate {
    ResponseChunk(String),
    ResponseEnd,
    Status(String),
    Error(String),
}

pub struct Channels {
    pub user_tx: mpsc::UnboundedSender<UserCommand>,
    pub user_rx: mpsc::UnboundedReceiver<UserCommand>,
    pub agent_tx: mpsc::UnboundedSender<AgentUpdate>,
    pub agent_rx: mpsc::UnboundedReceiver<AgentUpdate>,
}

impl Channels {
    pub fn new() -> Self {
        let (user_tx, user_rx) = mpsc::unbounded_channel();
        let (agent_tx, agent_rx) = mpsc::unbounded_channel();
        Self {
            user_tx,
            user_rx,
            agent_tx,
            agent_rx,
        }
    }
}