feat(tui): archive todos at turn end with incomplete hint

This commit is contained in:
Brooklyn Nicholson 2026-04-26 16:14:58 -05:00
parent 319c1c1691
commit c78b528125
12 changed files with 948 additions and 70 deletions

View file

@ -1,5 +1,8 @@
import type { Msg, TodoItem } from '../types.js'
export const countPendingTodos = (todos: readonly TodoItem[]) =>
todos.filter(todo => todo.status === 'in_progress' || todo.status === 'pending').length
export const isTodoDone = (todos: readonly TodoItem[]) =>
todos.length > 0 && todos.every(todo => todo.status === 'completed' || todo.status === 'cancelled')