Преглед изворни кода

fix(desktop): todo tool title

Adam пре 2 месеци
родитељ
комит
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"
         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}>