mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
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:
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user