From 79973a2d7d4cb296438fcc62c56871fe933d7789 Mon Sep 17 00:00:00 2001 From: sigoden Date: Tue, 5 Nov 2024 06:41:18 +0800 Subject: feat: change agent config/variables (#967) - abandon `.save agent-config` - add variables to agent config.yaml - don't save agent variables after initializing the agent and using `.variable ` --- src/repl/mod.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/repl/mod.rs') diff --git a/src/repl/mod.rs b/src/repl/mod.rs index 7bf70ea..f40bdd0 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -31,7 +31,7 @@ lazy_static::lazy_static! { const MENU_NAME: &str = "completion_menu"; lazy_static::lazy_static! { - static ref REPL_COMMANDS: [ReplCommand; 35] = [ + static ref REPL_COMMANDS: [ReplCommand; 34] = [ ReplCommand::new(".help", "Show this help message", AssertState::pass()), ReplCommand::new(".info", "View system info", AssertState::pass()), ReplCommand::new(".model", "Change the current LLM", AssertState::pass()), @@ -141,11 +141,6 @@ lazy_static::lazy_static! { "Set agent variable", AssertState::True(StateFlags::AGENT) ), - ReplCommand::new( - ".save agent-config", - "Save the current agent config to file", - AssertState::True(StateFlags::AGENT) - ), ReplCommand::new( ".info agent", "View agent info", @@ -346,11 +341,8 @@ impl Repl { Some(("session", name)) => { self.config.write().save_session(name)?; } - Some(("agent-config", _)) => { - self.config.write().save_agent_config()?; - } _ => { - println!(r#"Usage: .save [name]"#) + println!(r#"Usage: .save [name]"#) } } } -- cgit v1.2.3