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.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/server/src/config/config.ts b/packages/server/src/config/config.ts
index 6ce9c363..0cd7fa20 100644
--- a/packages/server/src/config/config.ts
+++ b/packages/server/src/config/config.ts
@@ -26,6 +26,7 @@ const DEFAULT_PASSTHROUGH_COMMANDS = ['ls', 'git', 'npm'];
export class Config {
private apiKey: string;
private model: string;
+ private sandbox: boolean | string;
private targetDir: string;
private toolRegistry: ToolRegistry;
private debugMode: boolean;
@@ -36,6 +37,7 @@ export class Config {
constructor(
apiKey: string,
model: string,
+ sandbox: boolean | string,
targetDir: string,
debugMode: boolean,
question: string,
@@ -44,6 +46,7 @@ export class Config {
) {
this.apiKey = apiKey;
this.model = model;
+ this.sandbox = sandbox;
this.targetDir = targetDir;
this.debugMode = debugMode;
this.question = question;
@@ -62,6 +65,10 @@ export class Config {
return this.model;
}
+ getSandbox(): boolean | string {
+ return this.sandbox;
+ }
+
getTargetDir(): string {
return this.targetDir;
}
@@ -113,6 +120,7 @@ export function loadEnvironment(): void {
export function createServerConfig(
apiKey: string,
model: string,
+ sandbox: boolean | string,
targetDir: string,
debugMode: boolean,
question: string,
@@ -122,6 +130,7 @@ export function createServerConfig(
return new Config(
apiKey,
model,
+ sandbox,
path.resolve(targetDir),
debugMode,
question,