diff options
| author | Olcan <[email protected]> | 2025-05-02 08:15:46 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-02 08:15:46 -0700 |
| commit | a7679db6e99f971306bc4b27c603e93bc67ac254 (patch) | |
| tree | b123af46cbcc119434ddc0cc3d6f5b10d5637601 /packages/server/src | |
| parent | 53ac7952c7ac11770037fecccda5f0f2fffa3e0b (diff) | |
sandbox setting and argument (#243)
Diffstat (limited to 'packages/server/src')
| -rw-r--r-- | packages/server/src/config/config.ts | 9 |
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, |
