mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-23 10:13:12 -07:00
fix(core): revert defaultModelConfigs.ts and fix formatting
This commit is contained in:
@@ -66,14 +66,9 @@ export const DEFAULT_MODEL_CONFIGS: ModelConfigServiceConfig = {
|
||||
},
|
||||
},
|
||||
'gemini-3-flash-preview': {
|
||||
extends: 'base',
|
||||
extends: 'chat-base-3',
|
||||
modelConfig: {
|
||||
model: 'gemini-3-flash-preview',
|
||||
generateContentConfig: {
|
||||
temperature: 0,
|
||||
topP: 0.95,
|
||||
topK: 64,
|
||||
},
|
||||
},
|
||||
},
|
||||
'gemini-2.5-pro': {
|
||||
@@ -182,14 +177,6 @@ export const DEFAULT_MODEL_CONFIGS: ModelConfigServiceConfig = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'web-search-internal': {
|
||||
extends: 'gemini-3-flash-base',
|
||||
modelConfig: {
|
||||
generateContentConfig: {
|
||||
tools: [{ googleSearch: {} }],
|
||||
},
|
||||
},
|
||||
},
|
||||
'web-fetch': {
|
||||
extends: 'gemini-3-flash-base',
|
||||
modelConfig: {
|
||||
|
||||
@@ -182,9 +182,7 @@ function extractCuratedHistory(comprehensiveHistory: Content[]): Content[] {
|
||||
}
|
||||
// Text parts must be non-empty strings
|
||||
if (part.text !== undefined) {
|
||||
return (
|
||||
typeof part.text === 'string' && (part.text).trim() !== ''
|
||||
);
|
||||
return typeof part.text === 'string' && part.text.trim() !== '';
|
||||
}
|
||||
// Keep other parts (functionCall, functionResponse, etc.)
|
||||
return true;
|
||||
@@ -215,8 +213,8 @@ function extractCuratedHistory(comprehensiveHistory: Content[]): Content[] {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
const lastText = existingTextPart.text as string;
|
||||
const separator = lastText.endsWith('\n') ? '' : '\n';
|
||||
|
||||
existingTextPart.text = lastText + separator + (part.text);
|
||||
|
||||
existingTextPart.text = lastText + separator + part.text;
|
||||
} else {
|
||||
lastEntryParts.push({ ...part });
|
||||
}
|
||||
@@ -1119,7 +1117,6 @@ export class GeminiChat {
|
||||
|
||||
const thoughtPart = content.parts[0];
|
||||
if (thoughtPart.text) {
|
||||
|
||||
const rawText = thoughtPart.text;
|
||||
const subjectStringMatches = rawText.match(/\*\*(.*?)\*\*/s);
|
||||
const subject = subjectStringMatches
|
||||
|
||||
Reference in New Issue
Block a user