feat: Added the memory configuration properties and storage to the main app config, roles, sessions, and agents.

This commit is contained in:
2026-06-10 17:50:28 -06:00
parent b2d70a3fd3
commit 7e097e0465
6 changed files with 117 additions and 0 deletions
+10
View File
@@ -83,6 +83,8 @@ pub struct Role {
inject_skill_instructions: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
skill_instructions: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
memory: Option<bool>,
#[serde(skip)]
model: Model,
@@ -132,6 +134,7 @@ impl Role {
"skill_instructions" => {
role.skill_instructions = value.as_str().map(|v| v.to_string())
}
"memory" => role.memory = value.as_bool(),
_ => (),
}
}
@@ -205,6 +208,9 @@ impl Role {
if let Some(skill_instructions) = &self.skill_instructions {
metadata.push(format!("skill_instructions: {skill_instructions}"));
}
if let Some(memory) = self.memory {
metadata.push(format!("memory: {memory}"));
}
if metadata.is_empty() {
format!("{}\n", self.prompt)
} else if self.prompt.is_empty() {
@@ -323,6 +329,10 @@ impl Role {
self.skill_instructions.as_deref()
}
pub fn memory(&self) -> Option<bool> {
self.memory
}
pub fn skills_enabled(&self) -> Option<bool> {
self.skills_enabled
}