fix(cli): simplify setup flags and agents tty handling (#155)

* fix(cli): simplify setup flags and agents tty handling

* fix(context): update ingest setup guidance flag
This commit is contained in:
Andrey Avtomonov 2026-05-19 19:23:35 +02:00 committed by GitHub
parent efda990de0
commit 590dd5dddb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 251 additions and 155 deletions

View file

@ -81,7 +81,7 @@ export type KtxSetupArgs =
| {
command: 'run';
projectDir: string;
mode: 'auto' | 'new' | 'existing';
mode: 'auto';
agents: boolean;
target?: KtxAgentTarget;
agentScope?: KtxAgentScope;
@ -93,7 +93,6 @@ export type KtxSetupArgs =
anthropicApiKeyEnv?: string;
anthropicApiKeyFile?: string;
llmModel?: string;
anthropicModel?: string;
vertexProject?: string;
vertexLocation?: string;
skipLlm: boolean;
@ -655,7 +654,6 @@ async function runKtxSetupInner(args: KtxSetupArgs, io: KtxCliIo, deps: KtxSetup
...(args.anthropicApiKeyEnv ? { anthropicApiKeyEnv: args.anthropicApiKeyEnv } : {}),
...(args.anthropicApiKeyFile ? { anthropicApiKeyFile: args.anthropicApiKeyFile } : {}),
...(args.llmModel ? { llmModel: args.llmModel } : {}),
...(args.anthropicModel ? { anthropicModel: args.anthropicModel } : {}),
...(args.vertexProject ? { vertexProject: args.vertexProject } : {}),
...(args.vertexLocation ? { vertexLocation: args.vertexLocation } : {}),
forcePrompt: forcePromptSteps.has('models') || runOnly === 'models',
@ -776,7 +774,10 @@ async function runKtxSetupInner(args: KtxSetupArgs, io: KtxCliIo, deps: KtxSetup
const agentResult = await agentsRunner(
{
projectDir: projectResult.projectDir,
inputMode: args.inputMode,
inputMode:
args.inputMode === 'auto' && io.stdout.isTTY !== true && deps.agentsDeps?.prompts === undefined
? 'disabled'
: args.inputMode,
yes: args.yes,
agents: true,
...(args.target ? { target: args.target } : {}),