fix(cli): resolve rebase conflicts, fix TypeScript errors, and update snapshots

This commit is contained in:
Keith Guerin
2026-02-27 14:24:52 -08:00
parent b6df967489
commit 9fda3431b8
6 changed files with 21 additions and 42 deletions

View File

@@ -290,23 +290,25 @@ describe('<HistoryItemDisplay />', () => {
unmount();
});
it('renders "Thinking..." header when isFirstThinking is true', () => {
it('renders "Thinking..." header when isFirstThinking is true', async () => {
const item: HistoryItem = {
...baseItem,
type: 'thinking',
thought: { subject: 'Thinking', description: 'test' },
};
const { lastFrame } = renderWithProviders(
<HistoryItemDisplay
{...baseItem}
item={item}
inlineThinkingMode="full"
isFirstThinking={true}
/>,
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
<HistoryItemDisplay {...baseItem} item={item} isFirstThinking={true} />,
{
settings: createMockSettings({
merged: { ui: { inlineThinkingMode: 'full' } },
}),
},
);
await waitUntilReady();
expect(lastFrame()).toContain(' Thinking...');
expect(lastFrame()).toContain('Thinking');
unmount();
});
it('does not render thinking item when disabled', async () => {

View File

@@ -36,10 +36,7 @@ import { HooksList } from './views/HooksList.js';
import { ModelMessage } from './messages/ModelMessage.js';
import { ThinkingMessage } from './messages/ThinkingMessage.js';
import { HintMessage } from './messages/HintMessage.js';
import {
getInlineThinkingMode,
type InlineThinkingMode,
} from '../utils/inlineThinkingMode.js';
import { getInlineThinkingMode } from '../utils/inlineThinkingMode.js';
import { useSettings } from '../contexts/SettingsContext.js';
interface HistoryItemDisplayProps {

View File

@@ -35,7 +35,7 @@ Footer
`;
exports[`Composer > Snapshots > matches snapshot while streaming 1`] = `
" LoadingIndicator: Thinking ShortcutsHint
" LoadingIndicator: Thinking
────────────────────────────────────────────────────────────────────────────────────────────────────
ApprovalModeIndicator
InputPrompt: Type your message or @path/to/file

View 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`] = `
"✦ Example code block:
... first 42 lines hidden ...
... 42 hidden (Ctrl+O) ...
43 Line 43
44 Line 44
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`] = `
" Example code block:
... first 42 lines hidden ...
... 42 hidden (Ctrl+O) ...
43 Line 43
44 Line 44
45 Line 45

View File

@@ -1,30 +1,8 @@
// 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`] = `
" Matching the Blocks
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
"
Matching the Blocks
│ Some more text
"
`;

View File

@@ -144,8 +144,10 @@ describe('usePhraseCycler', () => {
await act(async () => {
await vi.advanceTimersByTimeAsync(0);
});
expect(lastFrame()?.startsWith('Tip: ')).toBe(true);
expect(INFORMATIVE_TIPS).toContain(lastFrame()!.replace('Tip: ', ''));
expect(lastFrame().trim()?.startsWith('Tip: ')).toBe(true);
expect(INFORMATIVE_TIPS).toContain(
lastFrame().trim().replace('Tip: ', ''),
);
// After the first interval, it should be a witty phrase
await act(async () => {