Add an eval for and fix unsafe cloning behavior. (#24457)

This commit is contained in:
Christian Gunderman
2026-04-07 03:17:44 +00:00
committed by GitHub
parent 0a8da988ed
commit d2b775f9a7
8 changed files with 150 additions and 22 deletions
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { renderWithProviders } from '../../test-utils/render.js';
import { renderWithProviders, cleanup } from '../../test-utils/render.js';
import { createMockSettings } from '../../test-utils/settings.js';
import { makeFakeConfig } from '@google/gemini-cli-core';
import { waitFor } from '../../test-utils/async.js';
@@ -23,6 +23,7 @@ import {
import {
ApprovalMode,
debugLogger,
coreEvents,
type Config,
} from '@google/gemini-cli-core';
import * as path from 'node:path';
@@ -93,6 +94,8 @@ vi.mock('ink', async (importOriginal) => {
afterEach(() => {
vi.restoreAllMocks();
vi.useRealTimers();
cleanup();
});
const mockSlashCommands: SlashCommand[] = [
@@ -236,6 +239,7 @@ describe('InputPrompt', () => {
beforeEach(() => {
vi.resetAllMocks();
coreEvents.removeAllListeners();
vi.spyOn(
terminalCapabilityManager,
'isKittyProtocolEnabled',