mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 22:21:22 -07:00
bug(core): Fix spewie getter in hookTranslator.ts (#16108)
This commit is contained in:
@@ -12,6 +12,7 @@ import type {
|
||||
FunctionCallingConfig,
|
||||
} from '@google/genai';
|
||||
import { DEFAULT_GEMINI_FLASH_MODEL } from '../config/models.js';
|
||||
import { getResponseText } from '../utils/partUtils.js';
|
||||
|
||||
/**
|
||||
* Decoupled LLM request format - stable across Gemini CLI versions
|
||||
@@ -267,7 +268,7 @@ export class HookTranslatorGenAIv1 extends HookTranslator {
|
||||
*/
|
||||
toHookLLMResponse(sdkResponse: GenerateContentResponse): LLMResponse {
|
||||
return {
|
||||
text: sdkResponse.text,
|
||||
text: getResponseText(sdkResponse) ?? undefined,
|
||||
candidates: (sdkResponse.candidates || []).map((candidate) => {
|
||||
// Extract text parts from the candidate
|
||||
const textParts =
|
||||
|
||||
Reference in New Issue
Block a user