Adding a full_context command line argument. (#158)

* Adding a full_context command line argument.

* Update packages/cli/src/config/config.ts

Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>

* lint fix.

---------

Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
This commit is contained in:
Allen Hutchison
2025-04-24 16:08:29 -07:00
committed by GitHub
parent 133f39494e
commit 8cf3e1611e
3 changed files with 63 additions and 5 deletions

View File

@@ -29,6 +29,7 @@ export class Config {
private debugMode: boolean;
private question: string | undefined;
private passthroughCommands: string[];
private fullContext: boolean;
constructor(
apiKey: string,
@@ -37,6 +38,7 @@ export class Config {
debugMode: boolean,
question: string,
passthroughCommands?: string[],
fullContext?: boolean,
) {
this.apiKey = apiKey;
this.model = model;
@@ -45,6 +47,7 @@ export class Config {
this.question = question;
this.passthroughCommands =
passthroughCommands || DEFAULT_PASSTHROUGH_COMMANDS;
this.fullContext = fullContext || false;
this.toolRegistry = createToolRegistry(this);
}
@@ -75,6 +78,11 @@ export class Config {
getPassthroughCommands(): string[] {
return this.passthroughCommands;
}
getFullContext(): boolean {
// Added getter for fullContext
return this.fullContext;
}
}
function findEnvFile(startDir: string): string | null {
@@ -107,6 +115,7 @@ export function createServerConfig(
debugMode: boolean,
question: string,
passthroughCommands?: string[],
fullContext?: boolean,
): Config {
return new Config(
apiKey,
@@ -115,6 +124,7 @@ export function createServerConfig(
debugMode,
question,
passthroughCommands,
fullContext,
);
}