topchester-ai 0.12.0 → 0.13.0
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/dist/cli.mjs +12 -2
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -3681,10 +3681,19 @@ const rawTopchesterConfigSchema = z.object({
|
|
|
3681
3681
|
models: rawModelsSchema.optional(),
|
|
3682
3682
|
ignore: z.object({ paths: z.array(ignorePathSchema).optional() }).optional()
|
|
3683
3683
|
});
|
|
3684
|
+
function getGlobalTopchesterConfigDir() {
|
|
3685
|
+
return join(homedir(), ".config", "topchester");
|
|
3686
|
+
}
|
|
3687
|
+
function ensureGlobalTopchesterConfigDir() {
|
|
3688
|
+
const dir = getGlobalTopchesterConfigDir();
|
|
3689
|
+
mkdirSync(dir, { recursive: true });
|
|
3690
|
+
return dir;
|
|
3691
|
+
}
|
|
3684
3692
|
function loadTopchesterConfig(options) {
|
|
3693
|
+
const globalConfigDir = getGlobalTopchesterConfigDir();
|
|
3685
3694
|
const paths = [
|
|
3686
|
-
join(
|
|
3687
|
-
join(
|
|
3695
|
+
join(globalConfigDir, "config.yaml"),
|
|
3696
|
+
join(globalConfigDir, "config.jsonc"),
|
|
3688
3697
|
join(options.workspaceRoot, "topchester.yaml"),
|
|
3689
3698
|
join(options.workspaceRoot, "topchester.jsonc"),
|
|
3690
3699
|
join(options.workspaceRoot, ".topchester/config.local.yaml"),
|
|
@@ -3899,6 +3908,7 @@ function normalizeLogLevel(level) {
|
|
|
3899
3908
|
//#endregion
|
|
3900
3909
|
//#region src/app/context.ts
|
|
3901
3910
|
function createAppContext(options) {
|
|
3911
|
+
ensureGlobalTopchesterConfigDir();
|
|
3902
3912
|
const config = loadTopchesterConfig(options);
|
|
3903
3913
|
const modelGateway = new ModelGateway(normalizeModelGatewayConfig(config));
|
|
3904
3914
|
const loggerInfo = createTopchesterLogger(options.workspaceRoot);
|