mod migrations;
mod store;
pub(crate) use store::PromptHistoryStore;
pub(crate) type PromptHistorySnapshot = (PromptHistoryStore, Vec<String>);
pub(crate) type PromptHistoryLoadHandle = tokio::task::JoinHandle<Option<PromptHistorySnapshot>>;
#[derive(Debug, thiserror::Error)]
pub(crate) enum PromptHistoryError {
#[error("prompt history I/O failed: {0}")]
Io(#[from] std::io::Error),
#[error("prompt history SQLite operation failed: {0}")]
Sqlite(#[from] rusqlite::Error),
#[error("prompt history schema version {found} is newer than supported version {supported}")]
UnsupportedSchema { found: i64, supported: i64 },
#[error("could not determine the Rho data directory")]
DataDirectory,
}
#[cfg(test)]
#[path = "store_tests.rs"]
mod tests;