use thiserror::Error;
#[derive(Debug, Error)]
pub enum DiffError {
#[error("Version '{0}' not found in store")]
VersionNotFound(String),
#[error("Cannot rollback to version '{0}': no path exists")]
RollbackFailed(String),
#[error("Output too large: {size} tokens exceeds limit {limit}")]
OutputTooLarge { size: usize, limit: usize },
#[error("Serialization error: {0}")]
Serialization(#[from] serde_json::Error),
#[error("Invalid diff: {0}")]
InvalidDiff(String),
#[error("Content address collision for '{0}'")]
ContentAddressCollision(String),
#[error("Branch '{0}' not found")]
BranchNotFound(String),
}