Merge branch 'main' into chore/sync-gemini-cli-v0.1.21

This commit is contained in:
tanzhenxin
2025-08-22 10:20:01 +08:00
22 changed files with 984 additions and 701 deletions

View File

@@ -242,7 +242,7 @@ describe('parseArguments', () => {
await expect(parseArguments()).rejects.toThrow('process.exit called');
expect(mockConsoleError).toHaveBeenCalledWith(
expect.stringContaining('无效的选项值:'),
expect.stringContaining('Invalid values:'),
);
mockExit.mockRestore();

View File

@@ -564,7 +564,6 @@ export async function loadCliConfig(
(typeof argv.openaiLogging === 'undefined'
? settings.enableOpenAILogging
: argv.openaiLogging) ?? false,
sampling_params: settings.sampling_params,
systemPromptMappings: (settings.systemPromptMappings ?? [
{
baseUrls: [

View File

@@ -495,7 +495,6 @@ export const SETTINGS_SCHEMA = {
description: 'Show line numbers in the chat.',
showInDialog: true,
},
contentGenerator: {
type: 'object',
label: 'Content Generator',
@@ -505,15 +504,6 @@ export const SETTINGS_SCHEMA = {
description: 'Content generator settings.',
showInDialog: false,
},
sampling_params: {
type: 'object',
label: 'Sampling Params',
category: 'General',
requiresRestart: false,
default: undefined as Record<string, unknown> | undefined,
description: 'Sampling parameters for the model.',
showInDialog: false,
},
enableOpenAILogging: {
type: 'boolean',
label: 'Enable OpenAI Logging',

View File

@@ -192,6 +192,7 @@ export const useGeminiStream = (
return;
}
turnCancelledRef.current = true;
isSubmittingQueryRef.current = false;
abortControllerRef.current?.abort();
if (pendingHistoryItemRef.current) {
addItem(pendingHistoryItemRef.current, Date.now());