mirror of
https://github.com/google-gemini/gemini-cli
synced 2026-05-24 09:38:34 +00:00
chore: migrate console.error to debugLogger in usePromptCompletion (#12208)
Co-authored-by: Hriday Taneja <hridayt@google.com>
This commit is contained in:
parent
01ad74a870
commit
b31f6804fe
1 changed files with 4 additions and 1 deletions
|
|
@ -7,6 +7,7 @@
|
|||
import { useState, useCallback, useRef, useEffect, useMemo } from 'react';
|
||||
import type { Config } from '@google/gemini-cli-core';
|
||||
import {
|
||||
debugLogger,
|
||||
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
||||
getResponseText,
|
||||
} from '@google/gemini-cli-core';
|
||||
|
|
@ -151,7 +152,9 @@ export function usePromptCompletion({
|
|||
(error instanceof Error && error.name === 'AbortError')
|
||||
)
|
||||
) {
|
||||
console.error('prompt completion error:', error);
|
||||
debugLogger.warn(
|
||||
`[WARN] prompt completion failed: : (${error instanceof Error ? error.message : String(error)})`,
|
||||
);
|
||||
// Clear the last requested text to allow retry only on real errors
|
||||
lastRequestedTextRef.current = '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue