diff --git a/apps/desktop/layer/renderer/src/modules/ai-task/components/task-item.tsx b/apps/desktop/layer/renderer/src/modules/ai-task/components/task-item.tsx index 01d90816a..104e39009 100644 --- a/apps/desktop/layer/renderer/src/modules/ai-task/components/task-item.tsx +++ b/apps/desktop/layer/renderer/src/modules/ai-task/components/task-item.tsx @@ -173,15 +173,17 @@ export const TaskItem = memo(({ task }: { task: AITask }) => { { icon: "i-mgc-test-tube-cute-re", onClick: async () => { + const loadingId = toast.loading(t("tasks.toast.test_start")) try { - const loadingId = toast.loading(t("tasks.toast.test_start")) await testRunMutation.mutateAsync({ id: task.id }) toast.success(t("tasks.toast.test_success"), { id: loadingId, }) } catch (error) { console.error("Failed to run test:", error) - toast.error(t("tasks.toast.test_failed")) + toast.error(t("tasks.toast.test_failed"), { + id: loadingId, + }) } }, title: t("tasks.actions.test_run"), @@ -220,11 +222,11 @@ export const TaskItem = memo(({ task }: { task: AITask }) => { ] return ( -
+
-

{task.name}

+

{task.name}

{
-

+

{t("tasks.fields.schedule")}{" "} {formatScheduleText(task.schedule, t, i18n)}

{task.createdAt && ( -

+

{t("tasks.fields.created")}{" "} {dayjs(task.createdAt).format("MMM D, YYYY h:mm A")}