diff options
| author | Juliette Love <[email protected]> | 2025-04-20 20:20:40 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-20 20:20:40 +0100 |
| commit | a66ad2e2af3d4ffd0a7ab125215e7ed3c3325452 (patch) | |
| tree | 3e2090bee220f92dec467cc0f4e7e58b5df3fce5 /packages/server/src | |
| parent | 99f5ed9ecb2aa491612ecaed4139cdeda086681f (diff) | |
Simple debug mode for CLI side (#66)
* Adds debug mode config flag.
* Wire through debug lines
* Add debug mode logging example
* Run format
* Run format again
Diffstat (limited to 'packages/server/src')
| -rw-r--r-- | packages/server/src/config/config.ts | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/packages/server/src/config/config.ts b/packages/server/src/config/config.ts index 86cd7a6c..bd698cf6 100644 --- a/packages/server/src/config/config.ts +++ b/packages/server/src/config/config.ts @@ -13,11 +13,18 @@ export class Config { private apiKey: string; private model: string; private targetDir: string; + private debugMode: boolean; - constructor(apiKey: string, model: string, targetDir: string) { + constructor( + apiKey: string, + model: string, + targetDir: string, + debugMode: boolean, + ) { this.apiKey = apiKey; this.model = model; this.targetDir = targetDir; + this.debugMode = debugMode; } getApiKey(): string { @@ -31,6 +38,10 @@ export class Config { getTargetDir(): string { return this.targetDir; } + + getDebugMode(): boolean { + return this.debugMode; + } } function findEnvFile(startDir: string): string | null { @@ -60,6 +71,7 @@ export function createServerConfig( apiKey: string, model: string, targetDir: string, + debugMode: boolean, ): Config { - return new Config(apiKey, model, path.resolve(targetDir)); + return new Config(apiKey, model, path.resolve(targetDir), debugMode); } |
