mirror of
https://github.com/TencentCloud/TencentDB-Agent-Memory
synced 2026-07-13 13:54:29 +00:00
fix(plugin): add OpenClaw state dir fallback
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { homedir } from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
export interface OpenClawRuntimeStateLike {
|
||||
resolveStateDir?: () => string;
|
||||
}
|
||||
|
||||
export function resolveOpenClawStateDir(
|
||||
runtimeState: OpenClawRuntimeStateLike | undefined,
|
||||
): string {
|
||||
return runtimeState?.resolveStateDir?.() ?? path.join(homedir(), ".openclaw");
|
||||
}
|
||||
Reference in New Issue
Block a user