diff --git a/packages/cli/src/ui/components/Composer.tsx b/packages/cli/src/ui/components/Composer.tsx index 3a4d16228d..cf16b51cbc 100644 --- a/packages/cli/src/ui/components/Composer.tsx +++ b/packages/cli/src/ui/components/Composer.tsx @@ -26,7 +26,7 @@ import { useSettings } from '../contexts/SettingsContext.js'; import { ApprovalMode } from '@google/gemini-cli-core'; import { StreamingState } from '../types.js'; import { ConfigInitDisplay } from '../components/ConfigInitDisplay.js'; -import { AnchoredTodoListDisplay } from './messages/Todo.js'; +import { TodoTray } from './messages/Todo.js'; export const Composer = () => { const config = useConfig(); @@ -130,7 +130,7 @@ export const Composer = () => { )} - + {uiState.isInputActive && ( ', () => { }); }); -describe('', () => { +describe('', () => { const mockHistoryItem = { type: 'tool_group', id: '1', @@ -89,7 +89,7 @@ describe('', () => { const renderWithUiState = (uiState: Partial) => render( - + , ); diff --git a/packages/cli/src/ui/components/messages/Todo.tsx b/packages/cli/src/ui/components/messages/Todo.tsx index 80f19afea4..da6932d13b 100644 --- a/packages/cli/src/ui/components/messages/Todo.tsx +++ b/packages/cli/src/ui/components/messages/Todo.tsx @@ -41,7 +41,7 @@ const TodoStatusDisplay: React.FC<{ status: TodoStatus }> = ({ status }) => { } }; -export const AnchoredTodoListDisplay: React.FC = () => { +export const TodoTray: React.FC = () => { const uiState = useUIState(); const todos: TodoList | null = useMemo(() => { diff --git a/packages/cli/src/ui/components/messages/__snapshots__/Todo.test.tsx.snap b/packages/cli/src/ui/components/messages/__snapshots__/Todo.test.tsx.snap index 030e8eb6b8..26d78441ce 100644 --- a/packages/cli/src/ui/components/messages/__snapshots__/Todo.test.tsx.snap +++ b/packages/cli/src/ui/components/messages/__snapshots__/Todo.test.tsx.snap @@ -1,23 +1,5 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[` > renders null when no todos are in the history 1`] = `""`; - -exports[` > renders null when todos exist but none are in progress and full view is off 1`] = `""`; - -exports[` > renders only the in-progress task when full view is off 1`] = ` -"┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ 📝 Todo:(ctrl+t to expand)» In Progress Task │" -`; - -exports[` > renders the full todo list when full view is on 1`] = ` -"┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ 📝 Todo:(ctrl+t to collapse) │ -│ │ -│ ☐ Pending Task │ -│ » In Progress Task │ -│ ✓ Completed Task │" -`; - exports[` > renders a single todo item 1`] = `"☐ Single task"`; exports[` > renders a todo list with long descriptions that wrap 1`] = ` @@ -41,3 +23,21 @@ exports[` > renders a todo list with various statuses correct `; exports[` > renders an empty todo list correctly 1`] = `""`; + +exports[` > renders null when no todos are in the history 1`] = `""`; + +exports[` > renders null when todos exist but none are in progress and full view is off 1`] = `""`; + +exports[` > renders only the in-progress task when full view is off 1`] = ` +"┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ 📝 Todo:(ctrl+t to expand)» In Progress Task │" +`; + +exports[` > renders the full todo list when full view is on 1`] = ` +"┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ 📝 Todo:(ctrl+t to collapse) │ +│ │ +│ ☐ Pending Task │ +│ » In Progress Task │ +│ ✓ Completed Task │" +`;