Question flag (#125)

This commit is contained in:
Allen Hutchison
2025-04-22 18:32:03 -07:00
committed by GitHub
parent ef7dcdb49e
commit 9bc9c6e6c5
4 changed files with 25 additions and 4 deletions

View File

@@ -26,6 +26,7 @@ export class Config {
private targetDir: string;
private toolRegistry: ToolRegistry;
private debugMode: boolean;
private question: string | undefined;
private passthroughCommands: string[];
constructor(
@@ -33,12 +34,14 @@ export class Config {
model: string,
targetDir: string,
debugMode: boolean,
question: string,
passthroughCommands?: string[],
) {
this.apiKey = apiKey;
this.model = model;
this.targetDir = targetDir;
this.debugMode = debugMode;
this.question = question;
this.passthroughCommands =
passthroughCommands || DEFAULT_PASSTHROUGH_COMMANDS;
@@ -64,6 +67,9 @@ export class Config {
getDebugMode(): boolean {
return this.debugMode;
}
getQuestion(): string | undefined {
return this.question;
}
getPassthroughCommands(): string[] {
return this.passthroughCommands;
@@ -98,6 +104,7 @@ export function createServerConfig(
model: string,
targetDir: string,
debugMode: boolean,
question: string,
passthroughCommands?: string[],
): Config {
return new Config(
@@ -105,6 +112,7 @@ export function createServerConfig(
model,
path.resolve(targetDir),
debugMode,
question,
passthroughCommands,
);
}