use chrono::{DateTime, Utc};
use serde::Serialize;
use std::path::PathBuf;
pub use crate::timeline::TimelineEntry;
pub use crate::timeline::ConversationMessage;
#[derive(Debug, Clone)]
pub struct OutputConfig {
pub dir: PathBuf,
pub format: OutputFormat,
pub mode: OutputMode,
pub max_files: usize,
pub max_message_chars: usize,
pub include_loctree: bool,
pub project_root: Option<PathBuf>,
}
impl Default for OutputConfig {
fn default() -> Self {
Self {
dir: PathBuf::from("."),
format: OutputFormat::Both,
mode: OutputMode::NewFile,
max_files: 0,
max_message_chars: 0,
include_loctree: false,
project_root: None,
}
}
}
#[derive(Debug, Clone, PartialEq)]
pub enum OutputFormat {
Markdown,
Json,
Both,
}
#[derive(Debug, Clone)]
pub enum OutputMode {
NewFile,
AppendTimeline(PathBuf),
}
#[derive(Debug, Clone, Serialize)]
pub struct ReportMetadata {
pub generated_at: DateTime<Utc>,
pub project_filter: Option<String>,
pub hours_back: u64,
pub total_entries: usize,
pub sessions: Vec<String>,
}
#[derive(Debug, Clone, Serialize)]
pub struct ConversationExtractStats {
pub aicx_version: &'static str,
pub redaction_enabled: bool,
pub raw_entries: usize,
pub conversation_messages: usize,
pub conversation_projection: &'static str,
pub exact_short_duplicates_dropped: usize,
pub harness_noise_dropped: usize,
}