use std::collections::HashMap;
use service_kit::api_dto;

#[api_dto]
#[derive(PartialEq)]
pub struct LlmConfig {
    pub model_id: Option<String>,
    pub temperature: Option<f32>,
    pub max_tokens: Option<u32>,
    pub extra_params: Option<HashMap<String, serde_json::Value>>,
}

#[api_dto]
#[derive(PartialEq)]
pub enum SelectionMode {
    Manual {
        rules: Vec<String>, // Glob patterns
    },
    Auto {
        llm_config: Option<LlmConfig>,
    },
    Hybrid {
        selection_prompt: String,
        llm_config: Option<LlmConfig>,
    },
}

pub type ContextSelectorConfig = SelectionMode;

#[api_dto]
#[derive(PartialEq)]
pub struct AnalysisModuleConfig {
    pub id: Option<String>, // Optional if key is ID
    pub name: String,
    pub dependencies: Vec<String>,
    pub context_selector: ContextSelectorConfig,
    pub analysis_prompt: String,
    pub llm_config: Option<LlmConfig>,
    pub output_type: String, // e.g. "markdown", "json"
}
