mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 03:03:24 -04:00
Includes: - memory-neo4j: four-phase sleep cycle (dedup, decay, extraction, cleanup) - memory-neo4j: full plugin implementation with hybrid search - memory-lancedb: updates and benchmarks - OpenSpec workflow skills and commands - Session memory hooks - Various CLI and config improvements Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
27 lines
897 B
JavaScript
27 lines
897 B
JavaScript
import * as lancedb from "@lancedb/lancedb";
|
|
|
|
const db = await lancedb.connect("/home/tsukhani/.openclaw/memory/lancedb");
|
|
const tables = await db.tableNames();
|
|
console.log("Tables:", tables);
|
|
|
|
if (tables.includes("memories")) {
|
|
const table = await db.openTable("memories");
|
|
const count = await table.countRows();
|
|
console.log("Memory count:", count);
|
|
|
|
const all = await table.query().limit(200).toArray();
|
|
|
|
const stats = { preference: 0, fact: 0, decision: 0, entity: 0, other: 0, core: 0 };
|
|
|
|
all.forEach((e) => {
|
|
stats[e.category] = (stats[e.category] || 0) + 1;
|
|
});
|
|
|
|
console.log("\nCategory breakdown:", stats);
|
|
console.log("\nSample entries:");
|
|
all.slice(0, 5).forEach((e, i) => {
|
|
console.log(`${i + 1}. [${e.category}] ${(e.text || "").substring(0, 100)}...`);
|
|
console.log(` id: ${e.id}, importance: ${e.importance}, vectorDim: ${e.vector?.length}`);
|
|
});
|
|
}
|