mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-29 12:47:15 -07:00
Merge branch 'pr4-cli' into mb/agents/01-core-types-fixes
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user