huskies: merge 1186 story compact chat command: distill session context deterministically, then reset with a seed
This commit is contained in:
@@ -120,6 +120,16 @@ pub struct BotContext {
|
||||
/// Optional model override from bot.toml. Passed as `--model` to the
|
||||
/// `claude` CLI when set.
|
||||
pub model: Option<String>,
|
||||
/// Maximum size in bytes of the digest the `compact` command writes as a
|
||||
/// seed file. From `bot.toml`'s `compact_seed_max_bytes`.
|
||||
pub compact_seed_max_bytes: usize,
|
||||
/// `cache_read_input_tokens` threshold above which the bot suggests
|
||||
/// running `compact` after a turn. From `bot.toml`'s
|
||||
/// `cache_read_suggest_threshold`.
|
||||
pub cache_read_suggest_threshold: u64,
|
||||
/// Minimum seconds between repeated `compact` suggestions for the same
|
||||
/// room. From `bot.toml`'s `compact_suggest_cooldown_secs`.
|
||||
pub compact_suggest_cooldown_secs: i64,
|
||||
}
|
||||
|
||||
impl BotContext {
|
||||
@@ -343,6 +353,9 @@ mod tests {
|
||||
gateway_port: None,
|
||||
last_matrix_event_ms: Arc::new(AtomicI64::new(chrono::Utc::now().timestamp_millis())),
|
||||
model: None,
|
||||
compact_seed_max_bytes: 8_000,
|
||||
cache_read_suggest_threshold: 50_000,
|
||||
compact_suggest_cooldown_secs: 3_600,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user