mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
fix(cli): resolve rebase conflicts, fix TypeScript errors, and update snapshots
This commit is contained in:
@@ -290,23 +290,25 @@ describe('<HistoryItemDisplay />', () => {
|
|||||||
unmount();
|
unmount();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('renders "Thinking..." header when isFirstThinking is true', () => {
|
it('renders "Thinking..." header when isFirstThinking is true', async () => {
|
||||||
const item: HistoryItem = {
|
const item: HistoryItem = {
|
||||||
...baseItem,
|
...baseItem,
|
||||||
type: 'thinking',
|
type: 'thinking',
|
||||||
thought: { subject: 'Thinking', description: 'test' },
|
thought: { subject: 'Thinking', description: 'test' },
|
||||||
};
|
};
|
||||||
const { lastFrame } = renderWithProviders(
|
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
|
||||||
<HistoryItemDisplay
|
<HistoryItemDisplay {...baseItem} item={item} isFirstThinking={true} />,
|
||||||
{...baseItem}
|
{
|
||||||
item={item}
|
settings: createMockSettings({
|
||||||
inlineThinkingMode="full"
|
merged: { ui: { inlineThinkingMode: 'full' } },
|
||||||
isFirstThinking={true}
|
}),
|
||||||
/>,
|
},
|
||||||
);
|
);
|
||||||
|
await waitUntilReady();
|
||||||
|
|
||||||
expect(lastFrame()).toContain(' Thinking...');
|
expect(lastFrame()).toContain(' Thinking...');
|
||||||
expect(lastFrame()).toContain('Thinking');
|
expect(lastFrame()).toContain('Thinking');
|
||||||
|
unmount();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does not render thinking item when disabled', async () => {
|
it('does not render thinking item when disabled', async () => {
|
||||||
|
|||||||
@@ -36,10 +36,7 @@ import { HooksList } from './views/HooksList.js';
|
|||||||
import { ModelMessage } from './messages/ModelMessage.js';
|
import { ModelMessage } from './messages/ModelMessage.js';
|
||||||
import { ThinkingMessage } from './messages/ThinkingMessage.js';
|
import { ThinkingMessage } from './messages/ThinkingMessage.js';
|
||||||
import { HintMessage } from './messages/HintMessage.js';
|
import { HintMessage } from './messages/HintMessage.js';
|
||||||
import {
|
import { getInlineThinkingMode } from '../utils/inlineThinkingMode.js';
|
||||||
getInlineThinkingMode,
|
|
||||||
type InlineThinkingMode,
|
|
||||||
} from '../utils/inlineThinkingMode.js';
|
|
||||||
import { useSettings } from '../contexts/SettingsContext.js';
|
import { useSettings } from '../contexts/SettingsContext.js';
|
||||||
|
|
||||||
interface HistoryItemDisplayProps {
|
interface HistoryItemDisplayProps {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ Footer
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`Composer > Snapshots > matches snapshot while streaming 1`] = `
|
exports[`Composer > Snapshots > matches snapshot while streaming 1`] = `
|
||||||
" LoadingIndicator: Thinking ShortcutsHint
|
" LoadingIndicator: Thinking
|
||||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
ApprovalModeIndicator
|
ApprovalModeIndicator
|
||||||
InputPrompt: Type your message or @path/to/file
|
InputPrompt: Type your message or @path/to/file
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ exports[`<HistoryItemDisplay /> > gemini items (alternateBuffer=false) > should
|
|||||||
|
|
||||||
exports[`<HistoryItemDisplay /> > gemini items (alternateBuffer=false) > should render a truncated gemini item 1`] = `
|
exports[`<HistoryItemDisplay /> > gemini items (alternateBuffer=false) > should render a truncated gemini item 1`] = `
|
||||||
"✦ Example code block:
|
"✦ Example code block:
|
||||||
... first 42 lines hidden ...
|
... 42 hidden (Ctrl+O) ...
|
||||||
43 Line 43
|
43 Line 43
|
||||||
44 Line 44
|
44 Line 44
|
||||||
45 Line 45
|
45 Line 45
|
||||||
@@ -126,7 +126,7 @@ exports[`<HistoryItemDisplay /> > gemini items (alternateBuffer=false) > should
|
|||||||
|
|
||||||
exports[`<HistoryItemDisplay /> > gemini items (alternateBuffer=false) > should render a truncated gemini_content item 1`] = `
|
exports[`<HistoryItemDisplay /> > gemini items (alternateBuffer=false) > should render a truncated gemini_content item 1`] = `
|
||||||
" Example code block:
|
" Example code block:
|
||||||
... first 42 lines hidden ...
|
... 42 hidden (Ctrl+O) ...
|
||||||
43 Line 43
|
43 Line 43
|
||||||
44 Line 44
|
44 Line 44
|
||||||
45 Line 45
|
45 Line 45
|
||||||
|
|||||||
+2
-24
@@ -1,30 +1,8 @@
|
|||||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||||
|
|
||||||
exports[`ThinkingMessage > indents summary line correctly 1`] = `
|
|
||||||
" Summary line
|
|
||||||
│ First body line
|
|
||||||
"
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`ThinkingMessage > normalizes escaped newline tokens 1`] = `
|
exports[`ThinkingMessage > normalizes escaped newline tokens 1`] = `
|
||||||
" Matching the Blocks
|
" │
|
||||||
|
│ Matching the Blocks
|
||||||
│ Some more text
|
│ Some more text
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`ThinkingMessage > renders full mode with left border and full text 1`] = `
|
|
||||||
" Planning
|
|
||||||
│ I am planning the solution.
|
|
||||||
"
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`ThinkingMessage > renders subject line 1`] = `
|
|
||||||
" Planning
|
|
||||||
│ test
|
|
||||||
"
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`ThinkingMessage > uses description when subject is empty 1`] = `
|
|
||||||
" Processing details
|
|
||||||
"
|
|
||||||
`;
|
|
||||||
|
|||||||
@@ -144,8 +144,10 @@ describe('usePhraseCycler', () => {
|
|||||||
await act(async () => {
|
await act(async () => {
|
||||||
await vi.advanceTimersByTimeAsync(0);
|
await vi.advanceTimersByTimeAsync(0);
|
||||||
});
|
});
|
||||||
expect(lastFrame()?.startsWith('Tip: ')).toBe(true);
|
expect(lastFrame().trim()?.startsWith('Tip: ')).toBe(true);
|
||||||
expect(INFORMATIVE_TIPS).toContain(lastFrame()!.replace('Tip: ', ''));
|
expect(INFORMATIVE_TIPS).toContain(
|
||||||
|
lastFrame().trim().replace('Tip: ', ''),
|
||||||
|
);
|
||||||
|
|
||||||
// After the first interval, it should be a witty phrase
|
// After the first interval, it should be a witty phrase
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user