use anyhow::Result;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use super::tools::{FileChange, ToolExecution};
pub fn record_persistent(category: &str, data: &serde_json::Value) -> Result<()> {
tracing::debug!(category, data = ?data, "Recording persistent telemetry");
Ok(())
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct PersistentStats {
pub stats: PersistentStatsInner,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct PersistentStatsInner {
pub total_input_tokens: u64,
pub total_output_tokens: u64,
pub total_requests: u64,
pub executions_by_tool: HashMap<String, u64>,
pub files_modified: HashMap<String, u64>,
}
impl PersistentStats {
pub fn recent(&self, _limit: usize) -> Vec<ToolExecution> {
Vec::new()
}
pub fn all_file_changes(&self) -> Vec<(String, FileChange)> {
Vec::new()
}
pub fn by_tool(&self, _tool_name: &str) -> Vec<ToolExecution> {
Vec::new()
}
pub fn by_file(&self, _file_path: &str) -> Vec<ToolExecution> {
Vec::new()
}
pub fn summary(&self) -> String {
"0 total executions".to_string()
}
}
pub fn get_persistent_stats() -> PersistentStats {
PersistentStats::default()
}