Merge branch 'pr4-cli' into mb/agents/01-core-types-fixes

This commit is contained in:
Michael Bleigh
2026-04-02 11:04:29 -07:00
committed by GitHub
300 changed files with 16670 additions and 4772 deletions
+11 -7
View File
@@ -53,6 +53,7 @@ import {
handleMaxTurnsExceededError,
} from './utils/errors.js';
import { TextOutput } from './ui/utils/textOutput.js';
import { runNonInteractive as runNonInteractiveAgentSession } from './nonInteractiveCliAgentSession.js';
interface RunNonInteractiveParams {
config: Config;
@@ -62,13 +63,16 @@ interface RunNonInteractiveParams {
resumedSessionData?: ResumedSessionData;
}
export async function runNonInteractive({
config,
settings,
input,
prompt_id,
resumedSessionData,
}: RunNonInteractiveParams): Promise<void> {
export async function runNonInteractive(
params: RunNonInteractiveParams,
): Promise<void> {
const useAgentSession = params.config.getAgentSessionNoninteractiveEnabled();
if (useAgentSession) {
return runNonInteractiveAgentSession(params);
}
const { config, settings, input, prompt_id, resumedSessionData } = params;
return promptIdContext.run(prompt_id, async () => {
const consolePatcher = new ConsolePatcher({
stderr: true,