diff --git a/packages/app/pr/screenshots/todo-list-ui.png b/packages/app/pr/screenshots/todo-list-ui.png new file mode 100644 index 000000000..79475ed77 Binary files /dev/null and b/packages/app/pr/screenshots/todo-list-ui.png differ diff --git a/packages/app/src/app/pages/session.tsx b/packages/app/src/app/pages/session.tsx index 3a64e159d..a50c57556 100644 --- a/packages/app/src/app/pages/session.tsx +++ b/packages/app/src/app/pages/session.tsx @@ -24,6 +24,7 @@ import type { WorkspaceInfo } from "../lib/tauri"; import { Box, + Check, ChevronDown, Edit2, HardDrive, @@ -171,6 +172,16 @@ export default function SessionView(props: SessionViewProps) { "Workspace"; const workspaceKindLabel = (workspace: WorkspaceInfo) => workspace.workspaceType === "remote" ? "Remote" : "Local"; + const todoList = createMemo(() => props.todos.filter((todo) => todo.content.trim())); + const todoCount = createMemo(() => todoList().length); + const todoCompletedCount = createMemo(() => + todoList().filter((todo) => todo.status === "completed").length + ); + const todoLabel = createMemo(() => { + const total = todoCount(); + if (!total) return ""; + return `${todoCompletedCount()} out of ${total} tasks completed`; + }); const MAX_SESSIONS_PREVIEW = 3; const [previewCountByWorkspaceId, setPreviewCountByWorkspaceId] = createSignal< Record @@ -596,8 +607,7 @@ export default function SessionView(props: SessionViewProps) { }; createEffect(() => { - const todos = props.todos.filter((t) => t.content.trim()); - const count = todos.length; + const count = todoCount(); const prev = prevTodoCount(); if (count > prev && prev > 0) { const lastMsg = chatContainerEl?.querySelector('[data-message-role="assistant"]:last-child'); @@ -1094,6 +1104,60 @@ export default function SessionView(props: SessionViewProps) { + 0}> +
+
+
+ {todoLabel()} + Task list +
+
+ + {(todo, index) => { + const done = () => todo.status === "completed"; + const cancelled = () => todo.status === "cancelled"; + const active = () => todo.status === "in_progress"; + return ( +
+
+ + {index() + 1}. + +
+ + + + + + +
+
+
+ {todo.content} +
+
+ ); + }} +
+
+
+
+
+