mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-13 15:40:57 -07:00
chore(cli): fix linting and stability issues found in monorepo test run
This commit is contained in:
@@ -846,11 +846,11 @@ export function migrateDeprecatedSettings(
|
||||
const oldValue = settings[oldKey];
|
||||
const newValue = settings[newKey];
|
||||
|
||||
if (typeof oldValue === 'boolean') {
|
||||
if (oldValue === true || oldValue === false) {
|
||||
if (foundDeprecated) {
|
||||
foundDeprecated.push(prefix ? `${prefix}.${oldKey}` : oldKey);
|
||||
}
|
||||
if (typeof newValue === 'boolean') {
|
||||
if (newValue === true || newValue === false) {
|
||||
// Both exist, trust the new one
|
||||
if (removeDeprecated) {
|
||||
delete settings[oldKey];
|
||||
@@ -913,7 +913,7 @@ export function migrateDeprecatedSettings(
|
||||
let uiModified = false;
|
||||
|
||||
// Migrate hideIntroTips → hideTips (backward compatibility)
|
||||
if (typeof newUi['hideIntroTips'] === 'boolean') {
|
||||
if (newUi['hideIntroTips'] === true || newUi['hideIntroTips'] === false) {
|
||||
foundDeprecated.push('ui.hideIntroTips');
|
||||
if (newUi['hideTips'] === undefined) {
|
||||
newUi['hideTips'] = newUi['hideIntroTips'];
|
||||
@@ -960,6 +960,8 @@ export function migrateDeprecatedSettings(
|
||||
newUi['hideStatusWit'] = true;
|
||||
uiModified = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1015,7 +1017,7 @@ export function migrateDeprecatedSettings(
|
||||
|
||||
// Migrate enableLoadingPhrases: false → hideStatusTips/hideStatusWit: true
|
||||
const enableLP = newAccessibility['enableLoadingPhrases'];
|
||||
if (typeof enableLP === 'boolean') {
|
||||
if (enableLP === true || enableLP === false) {
|
||||
foundDeprecated.push('ui.accessibility.enableLoadingPhrases');
|
||||
if (
|
||||
!enableLP &&
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
renderWithProviders,
|
||||
persistentStateMock,
|
||||
} from '../../test-utils/render.js';
|
||||
import type { LoadedSettings } from '../../config/settings.js';
|
||||
import { AppHeader } from './AppHeader.js';
|
||||
import { describe, it, expect, vi } from 'vitest';
|
||||
import { makeFakeConfig } from '@google/gemini-cli-core';
|
||||
@@ -279,7 +280,7 @@ describe('<AppHeader />', () => {
|
||||
merged: {
|
||||
ui: { hideTips: true },
|
||||
},
|
||||
} as any,
|
||||
} as unknown as LoadedSettings,
|
||||
},
|
||||
);
|
||||
await waitUntilReady();
|
||||
|
||||
@@ -35,7 +35,7 @@ export const LoadingIndicator: React.FC<LoadingIndicatorProps> = ({
|
||||
currentLoadingPhrase,
|
||||
wittyPhrase,
|
||||
showWit = false,
|
||||
showTips = true,
|
||||
showTips: _showTips = true,
|
||||
errorVerbosity: _errorVerbosity = 'full',
|
||||
elapsedTime,
|
||||
inline = false,
|
||||
|
||||
Reference in New Issue
Block a user