mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-16 09:01:17 -07:00
feat(cli): truncate shell output in UI history and improve active shell display (#17438)
This commit is contained in:
@@ -47,7 +47,7 @@ const findScrollableCandidates = (
|
||||
const candidates: Array<ScrollableEntry & { area: number }> = [];
|
||||
|
||||
for (const entry of scrollables.values()) {
|
||||
if (!entry.ref.current || !entry.hasFocus()) {
|
||||
if (!entry.ref.current) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
import { act } from 'react';
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { renderHook } from '../../test-utils/render.js';
|
||||
import { waitFor } from '../../test-utils/async.js';
|
||||
import { ToolActionsProvider, useToolActions } from './ToolActionsContext.js';
|
||||
import {
|
||||
type Config,
|
||||
@@ -155,7 +156,7 @@ describe('ToolActionsContext', () => {
|
||||
|
||||
// Wait for IdeClient initialization in useEffect
|
||||
await act(async () => {
|
||||
await vi.waitFor(() => expect(IdeClient.getInstance).toHaveBeenCalled());
|
||||
await waitFor(() => expect(IdeClient.getInstance).toHaveBeenCalled());
|
||||
// Give React a chance to update state
|
||||
await new Promise((resolve) => setTimeout(resolve, 0));
|
||||
});
|
||||
@@ -195,7 +196,7 @@ describe('ToolActionsContext', () => {
|
||||
|
||||
// Wait for initialization
|
||||
await act(async () => {
|
||||
await vi.waitFor(() => expect(IdeClient.getInstance).toHaveBeenCalled());
|
||||
await waitFor(() => expect(IdeClient.getInstance).toHaveBeenCalled());
|
||||
await new Promise((resolve) => setTimeout(resolve, 0));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user