From 2aa95c4d0143b9c9168ff19ea4e4ee016bb0e9dd Mon Sep 17 00:00:00 2001 From: Jack Wotherspoon Date: Thu, 9 Apr 2026 10:02:49 -0400 Subject: [PATCH] chore: update spinner for /btw --- .../cli/src/ui/components/BtwDisplay.test.tsx | 16 +++------------- packages/cli/src/ui/components/BtwDisplay.tsx | 6 ++++-- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/packages/cli/src/ui/components/BtwDisplay.test.tsx b/packages/cli/src/ui/components/BtwDisplay.test.tsx index 4ae5719bfe..dfce20d374 100644 --- a/packages/cli/src/ui/components/BtwDisplay.test.tsx +++ b/packages/cli/src/ui/components/BtwDisplay.test.tsx @@ -7,15 +7,8 @@ import { describe, it, expect } from 'vitest'; import { renderWithProviders } from '../../test-utils/render.js'; import { BtwDisplay } from './BtwDisplay.js'; -import { StreamingState } from '../types.js'; import type { UIState } from '../contexts/UIStateContext.js'; -import { Text } from 'ink'; - -vi.mock('./GeminiRespondingSpinner.js', () => ({ - GeminiRespondingSpinner: () => , -})); - describe('BtwDisplay', () => { const defaultMockUiState = { renderMarkdown: true, @@ -71,7 +64,7 @@ describe('BtwDisplay', () => { unmount(); }); - it('renders a spinner when streaming', async () => { + it('renders a spinner and "Answering..." when streaming', async () => { const { lastFrame, unmount } = await renderWithProviders( { terminalWidth={100} />, { - uiState: { - ...defaultMockUiState, - streamingState: StreamingState.Responding, - }, + uiState: defaultMockUiState, }, ); const frame = lastFrame(); - expect(frame).toContain('⠋'); // Assuming standard spinner frame + expect(frame).toContain('Answering...'); unmount(); }); }); diff --git a/packages/cli/src/ui/components/BtwDisplay.tsx b/packages/cli/src/ui/components/BtwDisplay.tsx index e8062d4833..3568646851 100644 --- a/packages/cli/src/ui/components/BtwDisplay.tsx +++ b/packages/cli/src/ui/components/BtwDisplay.tsx @@ -9,7 +9,7 @@ import { Box, Text } from 'ink'; import { theme } from '../semantic-colors.js'; import { MarkdownDisplay } from '../utils/MarkdownDisplay.js'; import { useUIState } from '../contexts/UIStateContext.js'; -import { GeminiRespondingSpinner } from './GeminiRespondingSpinner.js'; +import { CliSpinner } from './CliSpinner.js'; interface BtwDisplayProps { query: string; @@ -74,7 +74,9 @@ export const BtwDisplay: React.FC = ({ {isStreaming && ( - + + Answering... + )}