Skeleton
Some checks failed
CI / ci (pull_request) Has been cancelled

This commit is contained in:
Drew 2026-02-23 22:02:26 -08:00
parent 42e3ddacc2
commit 0edffb4855
9 changed files with 3453 additions and 0 deletions

1
src/app/mod.rs Normal file
View file

@ -0,0 +1 @@

1
src/core/mod.rs Normal file
View file

@ -0,0 +1 @@
pub mod types;

56
src/core/types.rs Normal file
View file

@ -0,0 +1,56 @@
// Types are scaffolding — used in later phases.
#![allow(dead_code)]
/// A streaming event emitted by the model provider.
#[derive(Debug)]
pub enum StreamEvent {
/// A text chunk from the assistant's response.
TextDelta(String),
/// Number of input tokens used in this request.
InputTokens(u32),
/// Number of output tokens generated so far.
OutputTokens(u32),
/// The stream has completed successfully.
Done,
/// An error occurred during streaming.
Error(String),
}
/// An action sent from the TUI to the core orchestrator.
#[derive(Debug)]
pub enum UserAction {
/// The user has submitted a message.
SendMessage(String),
/// The user has requested to quit.
Quit,
}
/// An event sent from the core orchestrator to the TUI.
#[derive(Debug)]
pub enum UIEvent {
/// A text chunk to append to the current assistant message.
StreamDelta(String),
/// The current assistant turn has completed.
TurnComplete,
/// An error to display to the user.
Error(String),
}
/// The role of a participant in a conversation.
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum Role {
/// A message from the human user.
User,
/// A message from the AI assistant.
Assistant,
}
/// A single message in the conversation history.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct ConversationMessage {
/// The role of the message author.
pub role: Role,
/// The text content of the message.
pub content: String,
}

6
src/main.rs Normal file
View file

@ -0,0 +1,6 @@
mod app;
mod core;
mod provider;
mod tui;
fn main() {}

1
src/provider/mod.rs Normal file
View file

@ -0,0 +1 @@

1
src/tui/mod.rs Normal file
View file

@ -0,0 +1 @@