mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 17:27:54 +00:00
dev yolo
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
|||||||
isTelemetrySdkInitialized,
|
isTelemetrySdkInitialized,
|
||||||
GeminiEventType,
|
GeminiEventType,
|
||||||
parseAndFormatApiError,
|
parseAndFormatApiError,
|
||||||
|
ApprovalMode,
|
||||||
} from '@qwen-code/qwen-code-core';
|
} from '@qwen-code/qwen-code-core';
|
||||||
import { Content, Part, FunctionCall } from '@google/genai';
|
import { Content, Part, FunctionCall } from '@google/genai';
|
||||||
|
|
||||||
@@ -39,6 +40,12 @@ export async function runNonInteractive(
|
|||||||
|
|
||||||
const geminiClient = config.getGeminiClient();
|
const geminiClient = config.getGeminiClient();
|
||||||
|
|
||||||
|
// In YOLO mode, disable next_speaker check to avoid auto-continue.
|
||||||
|
if (config.getApprovalMode && config.getApprovalMode() === ApprovalMode.YOLO) {
|
||||||
|
(config as unknown as { getSkipNextSpeakerCheck: () => boolean }).getSkipNextSpeakerCheck =
|
||||||
|
() => true;
|
||||||
|
}
|
||||||
|
|
||||||
const abortController = new AbortController();
|
const abortController = new AbortController();
|
||||||
let currentMessages: Content[] = [
|
let currentMessages: Content[] = [
|
||||||
{ role: 'user', parts: [{ text: input }] },
|
{ role: 'user', parts: [{ text: input }] },
|
||||||
|
|||||||
Reference in New Issue
Block a user