refactor: eradicate deprecated tools (sticky_notes, pinned_files, context_workspaces, pr_checklist, preferences) and dead code
This commit is contained in:
1 parent
d80915635f
commit
79209da711
31 files changed
+1230
-3920
No files matched your search
+1
-45
@@ -105,9 +105,7 @@ pub async fn ttl_sweeper_worker(state: Arc<MemoryState>) {
|
||||
state.project.tasks.modify(|tasks| {
|
||||
tasks.retain(|t| t.expires_at.is_none_or(|exp| exp > now));
|
||||
});
|
||||
state.code.sticky.modify(|notes| {
|
||||
notes.retain(|n| n.expires_at.is_none_or(|exp| exp > now));
|
||||
});
|
||||
|
||||
state.telemetry.handoff_memos.modify(|memos| {
|
||||
memos.retain(|m| m.expires_at.is_none_or(|exp| exp > now));
|
||||
});
|
||||
@@ -139,48 +137,6 @@ pub async fn condense_graph_worker(state: Arc<MemoryState>) {
|
||||
.unwrap_or_default()
|
||||
.as_secs();
|
||||
|
||||
let sticky_condensation = state.code.sticky.read_with(|notes| {
|
||||
if notes.len() > threshold {
|
||||
let mut sorted = notes.clone();
|
||||
sorted.sort_by_key(|n| n.timestamp);
|
||||
let to_remove = sorted.len() - (threshold / 2);
|
||||
let removed: Vec<_> = sorted.into_iter().take(to_remove).collect();
|
||||
let mut content = String::new();
|
||||
let mut ids = Vec::new();
|
||||
for r in &removed {
|
||||
content.push_str(&format!("{}\n", r.content));
|
||||
ids.push(r.id.clone());
|
||||
}
|
||||
Some((content, ids))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
});
|
||||
|
||||
if let Some((content, ids)) = sticky_condensation {
|
||||
if !content.is_empty() {
|
||||
let name = format!("StickyNote History {}", now);
|
||||
state.modify_graph(|graph| {
|
||||
graph.entities.insert(
|
||||
name.clone(),
|
||||
crate::models::Entity {
|
||||
name: name.clone(),
|
||||
entity_type: "Historical Summary".to_string(),
|
||||
observations: vec![content],
|
||||
namespace: crate::models::default_namespace(),
|
||||
git_branch: None,
|
||||
..Default::default()
|
||||
},
|
||||
);
|
||||
});
|
||||
let id_set: std::collections::HashSet<String> = ids.into_iter().collect();
|
||||
state.code.sticky.modify(|notes| {
|
||||
notes.retain(|n| !id_set.contains(&n.id));
|
||||
});
|
||||
tracing::info!("Condensed sticky notes into Historical Summary.");
|
||||
}
|
||||
}
|
||||
|
||||
let snippet_condensation = state.code.snippets.read_with(|snippets| {
|
||||
if snippets.len() > threshold {
|
||||
let mut sorted = snippets.clone();
|
||||
|
||||
Reference in new issue
Block a user