Skip to main content

codetether_agent/tool/context_summarize/
tool_struct.rs

1//! Tool state for `context_summarize`.
2
3use std::sync::Arc;
4
5use crate::provider::Provider;
6
7/// Summarize (read cached) or produce summary for a turn range.
8pub struct ContextSummarizeTool {
9    pub(crate) provider: Option<Arc<dyn Provider>>,
10    pub(crate) model: Option<String>,
11}
12
13impl ContextSummarizeTool {
14    pub fn cached_only() -> Self {
15        Self {
16            provider: None,
17            model: None,
18        }
19    }
20
21    pub fn new(provider: Arc<dyn Provider>, model: String) -> Self {
22        Self {
23            provider: Some(provider),
24            model: Some(model),
25        }
26    }
27}