use std::collections::HashMap;
use serde::{Deserialize, Serialize};
pub mod config;
pub mod engine;
pub mod templates;
pub use config::GuidanceConfig;
pub use engine::GuidanceEngine;
#[derive(Debug, Clone, Serialize)]
pub struct TemplateContext {
pub tool: String,
pub query: Option<String>,
pub result_count: usize,
pub has_results: bool,
pub custom: HashMap<String, String>,
}
impl TemplateContext {
pub fn new(tool: &str, result_count: usize) -> Self {
Self {
tool: tool.to_string(),
query: None,
result_count,
has_results: result_count > 0,
custom: HashMap::new(),
}
}
pub fn with_query(mut self, query: Option<&str>) -> Self {
self.query = query.map(String::from);
self
}
pub fn with_custom(mut self, key: &str, value: &str) -> Self {
self.custom.insert(key.to_string(), value.to_string());
self
}
}
#[derive(Debug, Clone)]
pub struct GuidanceResult {
pub message: String,
pub confidence: f32,
pub is_fallback: bool,
}