use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VizThought {
pub id: String,
pub content: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub thought_type: Option<String>,
pub position: [f32; 3],
pub has_embedding: bool,
pub created_at: u64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VizCommit {
pub hash: String,
pub message: String,
pub author: String,
pub timestamp: u64,
pub parents: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VizExport {
pub thoughts: Vec<VizThought>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub commits: Vec<VizCommit>,
pub meta: VizMeta,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VizMeta {
pub total_thoughts: usize,
pub embedded_thoughts: usize,
pub reduction_method: String,
pub original_dim: usize,
#[serde(skip_serializing_if = "Option::is_none")]
pub variance_explained: Option<[f64; 3]>,
#[serde(skip_serializing_if = "Option::is_none")]
pub embedder_model: Option<String>,
}