delete 20 dead public functions across 12 files

Removed functions with zero callers: parse_timestamp_to_epoch,
hash_key, search_weighted_debug, extract_query_terms, format_results,
move_to_neighbor, adjust_edge_strength, update_graph_metrics,
nearest_to_seeds, nystrom_project, chat_completion_stream, cmd_read,
context_message, split_candidates, split_plan_prompt,
split_extract_prompt, log_event_pub, log_verbose, rpc_record_hits,
memory_definitions. -245 lines.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-02 16:21:01 -04:00
parent b0e852a05f
commit 91eb9c95cc
12 changed files with 0 additions and 245 deletions

View file

@ -200,27 +200,6 @@ impl Store {
});
}
/// Adjust edge strength between two nodes by a delta.
/// Clamps to [0.05, 0.95]. Returns (old_strength, new_strength, edges_modified).
pub fn adjust_edge_strength(&mut self, key_a: &str, key_b: &str, delta: f32) -> (f32, f32, usize) {
let mut old = 0.0f32;
let mut new = 0.0f32;
let mut count = 0;
for rel in &mut self.relations {
if rel.deleted { continue; }
if (rel.source_key == key_a && rel.target_key == key_b)
|| (rel.source_key == key_b && rel.target_key == key_a)
{
old = rel.strength;
rel.strength = (rel.strength + delta).clamp(0.05, 0.95);
new = rel.strength;
rel.version += 1;
count += 1;
}
}
(old, new, count)
}
pub fn record_gap(&mut self, desc: &str) {
self.gaps.push(GapRecord {
description: desc.to_string(),
@ -307,18 +286,6 @@ impl Store {
Ok((hubs_capped, to_delete.len()))
}
/// Update graph-derived fields on all nodes
pub fn update_graph_metrics(&mut self) {
let g = self.build_graph();
let communities = g.communities();
for (key, node) in &mut self.nodes {
node.community_id = communities.get(key).copied();
node.clustering_coefficient = Some(g.clustering_coefficient(key));
node.degree = Some(g.degree(key) as u32);
}
}
/// Set a node's weight directly. Returns (old, new).
pub fn set_weight(&mut self, key: &str, weight: f32) -> Result<(f32, f32), String> {
let weight = weight.clamp(0.01, 1.0);