mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-23 15:38:10 +00:00
cli: show memory plugins in openclaw memory status
Detect configured memory plugins (memory-neo4j, memory-lancedb) and show their status alongside core memory search. Provides helpful hints about plugin-specific commands when plugins are enabled. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -546,6 +546,56 @@ export async function runMemoryStatus(opts: MemoryCommandOptions) {
|
||||
);
|
||||
defaultRuntime.log("");
|
||||
}
|
||||
|
||||
// Detect configured memory plugins and show hints
|
||||
const memoryPlugins = detectMemoryPlugins(cfg);
|
||||
if (memoryPlugins.length > 0) {
|
||||
defaultRuntime.log(heading("Memory Plugins"));
|
||||
for (const plugin of memoryPlugins) {
|
||||
const statusText = plugin.enabled ? success("enabled") : muted("disabled");
|
||||
defaultRuntime.log(`${info(plugin.id)} ${statusText}`);
|
||||
if (plugin.hint) {
|
||||
defaultRuntime.log(muted(` → ${plugin.hint}`));
|
||||
}
|
||||
}
|
||||
defaultRuntime.log("");
|
||||
}
|
||||
}
|
||||
|
||||
type MemoryPluginInfo = {
|
||||
id: string;
|
||||
enabled: boolean;
|
||||
hint?: string;
|
||||
};
|
||||
|
||||
function detectMemoryPlugins(cfg: ReturnType<typeof loadConfig>): MemoryPluginInfo[] {
|
||||
const plugins: MemoryPluginInfo[] = [];
|
||||
const entries = cfg.plugins?.entries ?? {};
|
||||
const activeSlot = cfg.plugins?.slots?.memory;
|
||||
|
||||
// Check for memory-neo4j plugin
|
||||
if (entries["memory-neo4j"]) {
|
||||
const entry = entries["memory-neo4j"];
|
||||
const enabled = entry.enabled !== false && activeSlot !== "none";
|
||||
plugins.push({
|
||||
id: "memory-neo4j",
|
||||
enabled,
|
||||
hint: enabled ? "Run `openclaw memory neo4j stats` for detailed statistics" : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
// Check for memory-lancedb plugin
|
||||
if (entries["memory-lancedb"]) {
|
||||
const entry = entries["memory-lancedb"];
|
||||
const enabled = entry.enabled !== false && activeSlot !== "none";
|
||||
plugins.push({
|
||||
id: "memory-lancedb",
|
||||
enabled,
|
||||
hint: enabled ? "Run `openclaw memory lancedb stats` for detailed statistics" : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
return plugins;
|
||||
}
|
||||
|
||||
export function registerMemoryCli(program: Command) {
|
||||
|
||||
Reference in New Issue
Block a user