fix: expand reply cwd (~) and document AGENTS

This commit is contained in:
Peter Steinberger
2025-12-14 02:59:31 +00:00
parent 5ace7c9c66
commit 507f5623f4
8 changed files with 105 additions and 7 deletions

View File

@@ -71,5 +71,14 @@ export function sleep(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
export function resolveUserPath(input: string): string {
const trimmed = input.trim();
if (!trimmed) return trimmed;
if (trimmed.startsWith("~")) {
return path.resolve(trimmed.replace("~", os.homedir()));
}
return path.resolve(trimmed);
}
// Fixed configuration root; legacy ~/.clawdis is no longer used.
export const CONFIG_DIR = path.join(os.homedir(), ".clawdis");