浏览代码

fix(desktop): todo tool title

Adam 8 月之前
父节点
当前提交
ec46f71258
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      packages/ui/src/components/message-part.tsx

+ 3 - 1
packages/ui/src/components/message-part.tsx

@@ -603,7 +603,9 @@ ToolRegistry.register({
         icon="checklist"
         icon="checklist"
         trigger={{
         trigger={{
           title: "To-dos",
           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}>
         <Show when={props.input.todos?.length}>