cargo fmt
ci / check (push) Canceled after 0s
ci / check (pull_request) Canceled after 0s

This commit is contained in:
hermes committed 2026-10-02 14:41:05 +00:00
1 parent 8f4b1f1729
commit 3070029c9e
1 file changed
+2 -4
+2 -4
View File
@@ -1,10 +1,10 @@
//! Agent loop: stream -> tool calls -> hooks -> results -> repeat.
use crate::compact;
use crate::window::ContextWindow;
use crate::hook::{Bus, Event};
use crate::session::Session;
use crate::tool::{Registry, ToolCtx};
use crate::window::ContextWindow;
use futures::StreamExt;
use hx_ai::{ContentBlock, Message, Provider, Request, Role, StopReason, StreamEvent, Usage};
use std::sync::Arc;
@@ -228,9 +228,7 @@ impl Agent {
if self.aborted() {
return Err(Error::Aborted);
}
if self.window.should_compact(&self.session.messages())
&& self.compact(6).await?
{
if self.window.should_compact(&self.session.messages()) && self.compact(6).await? {
self.emit(Event::Info("context compacted".into())).await;
}
self.emit(Event::TurnStart).await;