mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-02 07:54:48 -07:00
chore: migrate console.error to debugLogger in usePromptCompletion (#12208)
Co-authored-by: Hriday Taneja <hridayt@google.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
import { useState, useCallback, useRef, useEffect, useMemo } from 'react';
|
import { useState, useCallback, useRef, useEffect, useMemo } from 'react';
|
||||||
import type { Config } from '@google/gemini-cli-core';
|
import type { Config } from '@google/gemini-cli-core';
|
||||||
import {
|
import {
|
||||||
|
debugLogger,
|
||||||
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
||||||
getResponseText,
|
getResponseText,
|
||||||
} from '@google/gemini-cli-core';
|
} from '@google/gemini-cli-core';
|
||||||
@@ -151,7 +152,9 @@ export function usePromptCompletion({
|
|||||||
(error instanceof Error && error.name === 'AbortError')
|
(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
|
// Clear the last requested text to allow retry only on real errors
|
||||||
lastRequestedTextRef.current = '';
|
lastRequestedTextRef.current = '';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user