Reduce pub visibility: hippocampus, subconscious internals

hippocampus: cursor navigation, transcript parsing, similarity
functions to pub(crate). counters::open() made private.

subconscious: all format_* prompts helpers to pub(super),
load_defs and keys_to_replay_items made private,
consolidate_full_with_progress made private.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-07 17:29:12 -04:00
parent 9737641c86
commit 1f873140ae
7 changed files with 20 additions and 20 deletions

View file

@ -43,7 +43,7 @@ pub fn clear() -> Result<(), String> {
/// Temporal neighbors: nodes of the same type, sorted by timestamp.
/// Returns (prev, next) keys relative to the given node.
pub fn temporal_neighbors(store: &Store, key: &str) -> (Option<String>, Option<String>) {
pub(crate) fn temporal_neighbors(store: &Store, key: &str) -> (Option<String>, Option<String>) {
let Some(node) = store.nodes.get(key) else { return (None, None) };
let node_type = node.node_type;
@ -62,7 +62,7 @@ pub fn temporal_neighbors(store: &Store, key: &str) -> (Option<String>, Option<S
/// Digest hierarchy: find the parent digest for a node.
/// Journal → daily, daily → weekly, weekly → monthly.
pub fn digest_parent(store: &Store, key: &str) -> Option<String> {
pub(crate) fn digest_parent(store: &Store, key: &str) -> Option<String> {
let node = store.nodes.get(key)?;
let parent_type = match node.node_type {
@ -112,7 +112,7 @@ pub fn digest_parent(store: &Store, key: &str) -> Option<String> {
/// Digest children: find nodes that feed into this digest.
/// Monthly → weeklies, weekly → dailies, daily → journal entries.
pub fn digest_children(store: &Store, key: &str) -> Vec<String> {
pub(crate) fn digest_children(store: &Store, key: &str) -> Vec<String> {
let Some(node) = store.nodes.get(key) else { return vec![] };
let child_type = match node.node_type {
@ -157,7 +157,7 @@ pub fn digest_children(store: &Store, key: &str) -> Vec<String> {
}
/// Graph neighbors sorted by edge strength.
pub fn graph_neighbors(store: &Store, key: &str) -> Vec<(String, f32)> {
pub(crate) fn graph_neighbors(store: &Store, key: &str) -> Vec<(String, f32)> {
let mut neighbors: Vec<(String, f32)> = Vec::new();
for r in &store.relations {
if r.deleted { continue; }