mirror of
https://github.com/TencentCloud/TencentDB-Agent-Memory
synced 2026-07-10 12:34:27 +00:00
13 lines
337 B
TypeScript
13 lines
337 B
TypeScript
|
|
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");
|
||
|
|
}
|