feat(mcp): Add 5 developer enhancements (git, logs, clipboard watcher, ast skeleton, nvim ghost text)
This commit is contained in:
1 parent
ccc268d807
commit
0e9748f797
27 files changed
+1401
-174
No files matched your search
+9
-1
@@ -5,7 +5,15 @@ use std::sync::Arc;
|
||||
|
||||
pub fn init_redb(base: &Path) -> Arc<Database> {
|
||||
let redb_path = base.join("mcp_store.redb");
|
||||
let db = Arc::new(redb::Database::create(&redb_path).expect("Failed to create redb database"));
|
||||
let db = match redb::Database::create(&redb_path) {
|
||||
Ok(db) => Arc::new(db),
|
||||
Err(e) => {
|
||||
let err_msg = format!("CRITICAL FATAL ERROR: Failed to open or create redb database at {:?}. Error: {}. This almost always means another instance of mcp-memory-server is already running and holds the exclusive file lock on the database.", redb_path, e);
|
||||
eprintln!("{}", err_msg);
|
||||
tracing::error!("{}", err_msg);
|
||||
std::process::exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
// Ensure the table exists and migrate legacy JSON files
|
||||
let write_txn = db.begin_write().expect("Failed to begin write txn on redb");
|
||||
|
||||
Reference in new issue
Block a user