mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
sandbox setting and argument (#243)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user