feat: version string formatting yy.mm.dd.hhmmss, app icon, and test fixes

This commit is contained in:
Riz Ashraf committed 2026-09-18 02:05:08 +01:00
1 parent 1752753fcc
commit 81aac7245b
17 files changed
+170 -412

No files matched your search

+34 -5
View File
@@ -141,6 +141,14 @@ impl MemoryHandler {
"read_sticky_notes",
"Read all active sticky notes.",
),
crate::mcp::tool_def::<DeleteStickyNoteTool>(
"delete_sticky_note",
"Delete a specific sticky note by its 1-indexed position.",
),
crate::mcp::tool_def::<ClearStickyNotesTool>(
"clear_sticky_notes",
"Clear all active sticky notes.",
),
crate::mcp::tool_def::<CondenseEntityTool>(
"condense_entity",
"Condense or summarize an entity's observations to reduce size.",
@@ -527,7 +535,7 @@ impl MemoryHandler {
let mut result = KnowledgeGraph::default();
let full = self.state.get_full_graph();
for (id, doc_type) in matches {
for (id, doc_type, _, _, _) in matches {
if doc_type == "entity"
&& let Some(e) = full.entities.get(&id)
{
@@ -669,6 +677,27 @@ impl MemoryHandler {
.unwrap_or_else(|_| "[]".to_string());
Ok(vec![data.to_string()][0].clone())
}
"delete_sticky_note" => {
let req = parse_tool!(args.clone(), id, DeleteStickyNoteTool);
let mut success = false;
self.state.sticky.modify(|notes| {
if req.index > 0 && req.index <= notes.len() {
notes.remove(req.index - 1);
success = true;
}
});
if success {
Ok(vec!["Sticky note deleted.".to_string()][0].clone())
} else {
Err("Invalid sticky note index.".to_string())
}
}
"clear_sticky_notes" => {
self.state.sticky.modify(|notes| {
notes.clear();
});
Ok(vec!["All sticky notes cleared.".to_string()][0].clone())
}
"condense_entity" => {
let req = parse_tool!(args.clone(), id, CondenseEntityTool);
self.state.apply_sync_write(|master| {
@@ -1471,7 +1500,7 @@ impl MemoryHandler {
let mut adrs = Vec::new();
let full = self.state.get_full_graph();
for (id, doc_type) in &matches {
for (id, doc_type, _, _, _) in &matches {
if doc_type == "entity"
&& let Some(e) = full.entities.get(id)
{
@@ -1479,20 +1508,20 @@ impl MemoryHandler {
}
}
for t in self.state.tasks.read() {
if matches.iter().any(|(id, typ)| id == &t.id && typ == "task") {
if matches.iter().any(|(id, typ, _, _, _)| id == &t.id && typ == "task") {
tasks.push(t);
}
}
for s in self.state.snippets.read() {
if matches
.iter()
.any(|(id, typ)| id == &s.name && typ == "snippet")
.any(|(id, typ, _, _, _)| id == &s.name && typ == "snippet")
{
snippets.push(s);
}
}
for a in self.state.adrs.read() {
if matches.iter().any(|(id, typ)| id == &a.id && typ == "adr") {
if matches.iter().any(|(id, typ, _, _, _)| id == &a.id && typ == "adr") {
adrs.push(a);
}
}