summaryrefslogtreecommitdiffstats
path: root/src/config/mod.rs
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/config/mod.rs
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/config/mod.rs')
-rw-r--r--src/config/mod.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs
index b38dcd9..6f99fd6 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -51,7 +51,6 @@ const FUNCTIONS_DIR_NAME: &str = "functions";
const FUNCTIONS_FILE_NAME: &str = "functions.json";
const FUNCTIONS_BIN_DIR_NAME: &str = "bin";
const AGENTS_DIR_NAME: &str = "agents";
-const AGENT_VARIABLES_FILE_NAME: &str = "variables.yaml";
pub const TEMP_ROLE_NAME: &str = "%%";
pub const TEMP_RAG_NAME: &str = "temp";
@@ -367,10 +366,6 @@ impl Config {
Ok(Self::agent_data_dir(agent_name)?.join(format!("{rag_name}.yaml")))
}
- pub fn agent_variables_file(name: &str) -> Result<PathBuf> {
- Ok(Self::agent_data_dir(name)?.join(AGENT_VARIABLES_FILE_NAME))
- }
-
pub fn agents_functions_dir() -> Result<PathBuf> {
Ok(Self::functions_dir()?.join(AGENTS_DIR_NAME))
}
@@ -1419,14 +1414,6 @@ impl Config {
Ok(())
}
- pub fn save_agent_config(&mut self) -> Result<()> {
- let agent = match &self.agent {
- Some(v) => v,
- None => bail!("No agent"),
- };
- agent.save_config()
- }
-
pub fn exit_agent(&mut self) -> Result<()> {
self.exit_session()?;
if self.agent.take().is_some() {