summaryrefslogtreecommitdiff
path: root/packages/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/server/src')
-rw-r--r--packages/server/src/config/config.ts16
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);
}