summaryrefslogtreecommitdiffstats
path: root/src/repl
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-11-05 06:41:18 +0800
committerGitHub <noreply@github.com>2024-11-05 06:41:18 +0800
commit79973a2d7d4cb296438fcc62c56871fe933d7789 (patch)
tree61a719e77a5c164169754ff1f87aca39482b7ae0 /src/repl
parent9fa3d8cd134571b6a16fb1b328bed3c025742576 (diff)
downloadaichat-79973a2d7d4cb296438fcc62c56871fe933d7789.tar.gz
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 <key> <value>`
Diffstat (limited to 'src/repl')
-rw-r--r--src/repl/mod.rs12
1 files changed, 2 insertions, 10 deletions
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()),
@@ -142,11 +142,6 @@ lazy_static::lazy_static! {
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",
AssertState::True(StateFlags::AGENT),
@@ -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 <role|session|agent-config> [name]"#)
+ println!(r#"Usage: .save <role|session> [name]"#)
}
}
}