import { Link } from "@tanstack/react-router" import { ClockIcon, LightningIcon, PauseIcon, PlayIcon, PlusIcon, WarningCircleIcon, } from "@phosphor-icons/react" import type { AgentSchedule } from "@/lib/agents/types" import { AutomationTemplates } from "@/components/agents/AutomationTemplates" import { buttonVariants } from "@/components/ui/button" import { Skeleton } from "@/components/ui/skeleton" import { describeCron } from "@/lib/agents/cron" import { useAgentSchedules, useUpdateAgentSchedule, } from "@/lib/agents/queries" import { cn } from "@/lib/utils" function formatDate(value?: string | null): string { if (!value) return "Never run" const date = new Date(value) if (Number.isNaN(date.getTime())) return "Never run" return date.toLocaleString(undefined, { month: "short", day: "numeric", hour: "numeric", minute: "2-digit", }) } export function AutomationsList() { const schedulesQuery = useAgentSchedules() const schedules = schedulesQuery.data ?? [] const total = schedules.length const active = schedules.filter((s) => s.enabled).length const paused = total - active const issues = schedules.filter((s) => !!s.lastError).length return (
Run Open SWE on a recurring schedule. Each run starts a fresh agent thread.
Schedule Open SWE to run on a recurring cadence — review code, triage issues, or keep docs up to date.