swarm: set the fresh-session threshold per agent
This commit is contained in:
parent
49ee678117
commit
5175d3663e
1 changed files with 154 additions and 32 deletions
|
|
@ -21,7 +21,8 @@
|
|||
//! start, the agent runs on its local values.
|
||||
//!
|
||||
//! `subagent_models` and `max_subagents` are not read here. `soft_context_percent`
|
||||
//! is handed to the Bus, which the compaction policy reads at turn end.
|
||||
//! is handed to the Bus, which the compaction policy reads at turn end, and so is
|
||||
//! `fresh_session_percent`, which the pre-turn auto-reset reads.
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
|
|
@ -147,6 +148,9 @@ pub async fn run(bus: Bus) {
|
|||
target
|
||||
.bus
|
||||
.set_soft_context_percent(read.soft_context_percent);
|
||||
target
|
||||
.bus
|
||||
.set_fresh_session_percent(read.fresh_session_percent);
|
||||
}
|
||||
tokio::time::sleep(POLL_INTERVAL).await;
|
||||
}
|
||||
|
|
@ -234,6 +238,7 @@ mod tests {
|
|||
subagent_models: None,
|
||||
max_subagents: None,
|
||||
soft_context_percent: None,
|
||||
fresh_session_percent: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue