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

@@ -20,6 +20,7 @@ interface CliArgs {
model: string | undefined;
debug_mode: boolean | undefined;
question: string | undefined;
full_context: boolean | undefined;
}
function parseArguments(): CliArgs {
@@ -42,6 +43,13 @@ function parseArguments(): CliArgs {
description:
'The question to pass to the command when using piped input.',
})
.option('full_context', {
alias: 'f',
type: 'boolean',
description:
'Recursively include all files within the current directory as context.',
default: false,
})
.help()
.alias('h', 'help')
.strict().argv;
@@ -72,6 +80,7 @@ export function loadCliConfig(): Config {
process.cwd(),
argv.debug_mode || false,
argv.question || '',
// TODO: load passthroughCommands from .env file
undefined, // TODO: load passthroughCommands from .env file
argv.full_context || false,
);
}