feat(agent): memory condensation for longer context (#1457)
This commit is contained in:
@@ -13,10 +13,15 @@ impl AgentCommand {
|
||||
|
||||
let versions = AgentFactory::available_versions();
|
||||
let default_version = AgentFactory::default_version();
|
||||
let configured_version = AgentFactory::configured_version();
|
||||
|
||||
for version in versions {
|
||||
if version == default_version {
|
||||
if version == default_version && version == configured_version {
|
||||
writeln!(output, "* {} (default)", version)?;
|
||||
} else if version == default_version {
|
||||
writeln!(output, " {} (default)", version)?;
|
||||
} else if version == configured_version {
|
||||
writeln!(output, "* {}", version)?;
|
||||
} else {
|
||||
writeln!(output, " {}", version)?;
|
||||
}
|
||||
|
||||
@@ -31,12 +31,8 @@ pub async fn build_session(
|
||||
goose::providers::create(&provider_name, model_config).expect("Failed to create provider");
|
||||
|
||||
// Create the agent
|
||||
let agent_version: Option<String> = config.get("GOOSE_AGENT").ok();
|
||||
let mut agent = match agent_version {
|
||||
Some(version) => AgentFactory::create(&version, provider),
|
||||
None => AgentFactory::create(AgentFactory::default_version(), provider),
|
||||
}
|
||||
.expect("Failed to create agent");
|
||||
let mut agent = AgentFactory::create(&AgentFactory::configured_version(), provider)
|
||||
.expect("Failed to create agent");
|
||||
|
||||
// Setup extensions for the agent
|
||||
for extension in ExtensionManager::get_all().expect("should load extensions") {
|
||||
|
||||
Reference in New Issue
Block a user