cargo fmt
This commit is contained in:
1 parent
8f4b1f1729
commit
3070029c9e
1 file changed
+2
-4
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user