UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

17 lines • 665 B
import { createHash } from "node:crypto"; import { join } from "node:path"; import { getAgentDir } from "../../../../config.js"; export function goalStoreRef(sessionManager, cwd) { const sessionFile = sessionManager.getSessionFile(); const baseDir = sessionFile === undefined ? join(getAgentDir(), "extensions", "goal", "no-session", cwdStoreKey(cwd)) : join(sessionManager.getSessionDir(), "extensions", "goal"); return { baseDir, threadId: sessionManager.getSessionId(), }; } function cwdStoreKey(cwd) { return createHash("sha256").update(cwd).digest("hex").slice(0, 24); } //# sourceMappingURL=store-ref.js.map