@monotykamary/pi-vcc 0.6.3 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/core/settings.ts +4 -4
package/package.json
CHANGED
package/src/core/settings.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
2
|
-
import { homedir } from "os";
|
|
3
2
|
import { dirname, join } from "path";
|
|
3
|
+
import { getAgentDir } from "@earendil-works/pi-coding-agent";
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
5
|
+
const settingsPath = (): string =>
|
|
6
|
+
process.env.PI_VCC_CONFIG_PATH ?? join(getAgentDir(), "pi-vcc-config.json");
|
|
7
7
|
/** Backwards-compat export. Resolves at access time, not import time. */
|
|
8
8
|
const SETTINGS_PATH = settingsPath();
|
|
9
9
|
|
|
@@ -156,7 +156,7 @@ export function loadSettings(): PiVccSettings {
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
|
-
* Ensure ~/.pi/agent/pi-vcc-config.json exists with default keys.
|
|
159
|
+
* Ensure the pi-vcc config file (default ~/.pi/agent/pi-vcc-config.json) exists with default keys.
|
|
160
160
|
* - File missing → create with full default block.
|
|
161
161
|
* - File exists but invalid JSON → no-op (don't clobber user file).
|
|
162
162
|
* - File exists and valid → fill in missing default keys, preserve existing values.
|