mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 06:04:44 +00:00
Resolve os.homedir() lazily instead of at module load time
- Move homedir() calls into functions for lazy evaluation - Add GOOGLE_APPLICATION_CREDENTIALS support for Vertex AI
This commit is contained in:
parent
5eb53cdb9e
commit
d2882c2643
4 changed files with 54 additions and 6 deletions
|
|
@ -6,13 +6,12 @@ import { fileURLToPath } from "node:url";
|
|||
const GITHUB_API_RELEASES = "https://api.github.com/repos/openai/codex/releases/latest";
|
||||
const GITHUB_HTML_RELEASES = "https://github.com/openai/codex/releases/latest";
|
||||
|
||||
const DEFAULT_AGENT_DIR = join(homedir(), ".pi", "agent");
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const FALLBACK_PROMPT_PATH = join(__dirname, "codex-instructions.md");
|
||||
|
||||
function getAgentDir(): string {
|
||||
return process.env.PI_CODING_AGENT_DIR || DEFAULT_AGENT_DIR;
|
||||
return process.env.PI_CODING_AGENT_DIR || join(homedir(), ".pi", "agent");
|
||||
}
|
||||
|
||||
function getCacheDir(): string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue