Add agent context compaction
This commit is contained in:
15
src/app.rs
15
src/app.rs
@@ -94,6 +94,8 @@ pub(crate) struct App {
|
||||
#[cfg(target_os = "macos")]
|
||||
active_generation: Option<ActiveGeneration>,
|
||||
#[cfg(target_os = "macos")]
|
||||
active_compaction: Option<generation::CompactionRequest>,
|
||||
#[cfg(target_os = "macos")]
|
||||
agent_tools: Option<(i32, Arc<Mutex<crate::agent::Tools>>)>,
|
||||
#[cfg(target_os = "macos")]
|
||||
active_tools: Option<crate::agent::ActiveTools>,
|
||||
@@ -104,6 +106,9 @@ pub(crate) struct App {
|
||||
#[cfg(target_os = "macos")]
|
||||
_endpoint: Option<crate::server::ServerHandle>,
|
||||
error: Option<String>,
|
||||
pub(super) activity: Option<String>,
|
||||
#[cfg(target_os = "macos")]
|
||||
skip_compaction_once: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
|
||||
@@ -295,6 +300,8 @@ impl App {
|
||||
#[cfg(target_os = "macos")]
|
||||
active_generation: None,
|
||||
#[cfg(target_os = "macos")]
|
||||
active_compaction: None,
|
||||
#[cfg(target_os = "macos")]
|
||||
agent_tools: None,
|
||||
#[cfg(target_os = "macos")]
|
||||
active_tools: None,
|
||||
@@ -314,6 +321,9 @@ impl App {
|
||||
None
|
||||
}
|
||||
},
|
||||
activity: None,
|
||||
#[cfg(target_os = "macos")]
|
||||
skip_compaction_once: false,
|
||||
}
|
||||
}
|
||||
Err(error) => Self::failed(
|
||||
@@ -384,6 +394,8 @@ impl App {
|
||||
#[cfg(target_os = "macos")]
|
||||
active_generation: None,
|
||||
#[cfg(target_os = "macos")]
|
||||
active_compaction: None,
|
||||
#[cfg(target_os = "macos")]
|
||||
agent_tools: None,
|
||||
#[cfg(target_os = "macos")]
|
||||
active_tools: None,
|
||||
@@ -397,6 +409,9 @@ impl App {
|
||||
Some(service_error) => format!("{error} {service_error}"),
|
||||
None => error,
|
||||
}),
|
||||
activity: None,
|
||||
#[cfg(target_os = "macos")]
|
||||
skip_compaction_once: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user