Remove Store::cached(), consolidate on access_local()
- Remove CACHED_STORE, cached(), is_stale(), set_store() - redundant - Convert all Store::cached() callers to use access_local() - Single Store::load() call remains in access() fallback path All store access now goes through hippocampus::access() / access_local(), which handles socket connection or local fallback with caching. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
09b30d64f2
commit
1d88293ccf
6 changed files with 17 additions and 51 deletions
|
|
@ -212,10 +212,9 @@ async fn start(cli: crate::user::CliArgs) -> Result<()> {
|
|||
})
|
||||
.expect("spawn UI thread");
|
||||
|
||||
// Initialize store and set global handle for memory tools
|
||||
match crate::store::Store::cached().await {
|
||||
Ok(store) => crate::agent::tools::memory::set_store(store),
|
||||
Err(e) => eprintln!("Store init failed: {}", e),
|
||||
// Initialize store - access_local() caches it in STORE_ACCESS
|
||||
if let Err(e) = crate::hippocampus::access_local() {
|
||||
eprintln!("Store init failed: {}", e);
|
||||
}
|
||||
|
||||
// Start MCP server for external tool access
|
||||
|
|
@ -420,8 +419,8 @@ async fn run(
|
|||
unc.toggle(name).await;
|
||||
}
|
||||
}
|
||||
let store = crate::store::Store::cached().await.ok();
|
||||
let store_guard = match &store {
|
||||
let store_arc = crate::hippocampus::access_local().ok();
|
||||
let store_guard = match &store_arc {
|
||||
Some(s) => Some(s.lock().await),
|
||||
None => None,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue