use debugLogger instead of console.error (#11990)

This commit is contained in:
Jacob MacDonald
2025-10-24 16:31:25 -07:00
committed by GitHub
parent f934f01881
commit 81006605c8
2 changed files with 6 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ import type React from 'react';
import { Box, Text } from 'ink';
import { useUIState } from '../../contexts/UIStateContext.js';
import { ExtensionUpdateState } from '../../state/extensions.js';
import type { GeminiCLIExtension } from '@google/gemini-cli-core';
import { debugLogger, type GeminiCLIExtension } from '@google/gemini-cli-core';
interface ExtensionsList {
extensions: readonly GeminiCLIExtension[];
@@ -50,8 +50,10 @@ export const ExtensionsList: React.FC<ExtensionsList> = ({ extensions }) => {
case ExtensionUpdateState.NOT_UPDATABLE:
stateColor = 'green';
break;
case undefined:
break;
default:
console.error(`Unhandled ExtensionUpdateState ${state}`);
debugLogger.warn(`Unhandled ExtensionUpdateState ${state}`);
break;
}

View File

@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import type { GeminiCLIExtension } from '@google/gemini-cli-core';
import { debugLogger, type GeminiCLIExtension } from '@google/gemini-cli-core';
import { getErrorMessage } from '../../utils/errors.js';
import {
ExtensionUpdateState,
@@ -204,7 +204,7 @@ export const useExtensionUpdates = (
try {
callback(nonNullResults);
} catch (e) {
console.error(getErrorMessage(e));
debugLogger.warn(getErrorMessage(e));
}
});
});