fix(agents): default agent dir to multi-agent path

This commit is contained in:
Peter Steinberger committed 2026-01-06 21:54:42 +00:00
1 parent 7360abad8e
commit dba09058f5
3 files changed
+72 -7

No files matched your search

+12 -5
View File
@@ -1,14 +1,21 @@
import path from "node:path";
import { resolveConfigDir, resolveUserPath } from "../utils.js";
import { resolveStateDir } from "../config/paths.js";
import { DEFAULT_AGENT_ID } from "../routing/session-key.js";
import { resolveUserPath } from "../utils.js";
export function resolveClawdbotAgentDir(): string {
const defaultAgentDir = path.join(resolveConfigDir(), "agent");
const override =
process.env.CLAWDBOT_AGENT_DIR?.trim() ||
process.env.PI_CODING_AGENT_DIR?.trim() ||
defaultAgentDir;
return resolveUserPath(override);
process.env.PI_CODING_AGENT_DIR?.trim();
if (override) return resolveUserPath(override);
const defaultAgentDir = path.join(
resolveStateDir(),
"agents",
DEFAULT_AGENT_ID,
"agent",
);
return resolveUserPath(defaultAgentDir);
}
export function ensureClawdbotAgentEnv(): string {