diff options
| -rw-r--r-- | packages/ui/src/components/message-part.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/ui/src/components/message-part.tsx b/packages/ui/src/components/message-part.tsx index 9bc6e6550..01a6fb5f5 100644 --- a/packages/ui/src/components/message-part.tsx +++ b/packages/ui/src/components/message-part.tsx @@ -603,7 +603,9 @@ ToolRegistry.register({ icon="checklist" trigger={{ title: "To-dos", - subtitle: `${props.input.todos?.filter((t: any) => t.status === "completed").length}/${props.input.todos?.length}`, + subtitle: props.input.todos + ? `${props.input.todos.filter((t: any) => t.status === "completed").length}/${props.input.todos.length}` + : "", }} > <Show when={props.input.todos?.length}> |
