chore(toolchain): upgrade Bun to 1.4.4 and migrate console to TanStack Router

This commit is contained in:
root committed 2026-11-06 00:02:36 +08:00
1 parent b44ebc2ba1
commit 3b9376c75a
134 files changed
+893 -692

No files matched your search

@@ -1,7 +1,6 @@
import { type AgentCheckConfig, CAPABILITY_CATALOG, type KnownCapabilityId, type ScheduledJob } from "@umt/contracts";
import { ChevronRight, History, LoaderCircle, Pencil, Play, RotateCcw, SkipForward, Trash2 } from "lucide-react";
import { type ReactNode, useEffect, useRef, useState } from "react";
import { Link } from "react-router";
import { toast } from "sonner";
import { useDeleteSchedule } from "~/api/schedules.ts";
import { ConfirmDialog } from "~/components/console/confirm-dialog.tsx";
@@ -12,6 +11,7 @@ import { Button } from "~/components/ui/button.tsx";
import { Switch } from "~/components/ui/switch.tsx";
import { errorMessage } from "~/lib/api.ts";
import { agentRunLabel, formatRelative } from "~/lib/labels.ts";
import { Link } from "~/lib/router-compat.tsx";
import { formatTokens } from "~/lib/tokens.ts";
import { cn } from "~/lib/utils.ts";
import { NextRun, useJobActions } from "./auto-task-list.tsx";
@@ -1,7 +1,6 @@
import type { ScheduledJob, ScheduleGroup, ScheduleSpecInput } from "@umt/contracts";
import { ChevronRight, History, LoaderCircle, Play, RotateCcw, SkipForward } from "lucide-react";
import { useEffect, useRef, useState } from "react";
import { Link } from "react-router";
import { toast } from "sonner";
import { useRunScheduleNow, useSkipSchedule, useUpdateSchedule } from "~/api/schedules.ts";
import { StatusBadge } from "~/components/console/status-badge.tsx";
@@ -11,6 +10,7 @@ import { Pagination } from "~/components/ui/pagination.tsx";
import { Switch } from "~/components/ui/switch.tsx";
import { errorMessage } from "~/lib/api.ts";
import { formatRelative } from "~/lib/labels.ts";
import { Link } from "~/lib/router-compat.tsx";
import { readCollapseState, writeCollapseState } from "~/lib/ui-prefs.ts";
import { cn } from "~/lib/utils.ts";
import { IntervalSelect } from "./interval-select.tsx";
@@ -1,6 +1,5 @@
import { LoaderCircle, Sparkles } from "lucide-react";
import { useState } from "react";
import { useNavigate } from "react-router";
import { toast } from "sonner";
import { useCreateAgentRun } from "~/api/agent.ts";
import { FormField } from "~/components/console/form-field.tsx";
@@ -16,6 +15,7 @@ import {
} from "~/components/ui/dialog.tsx";
import { Textarea } from "~/components/ui/textarea.tsx";
import { errorMessage } from "~/lib/api.ts";
import { useNavigate } from "~/lib/router-compat.tsx";
// 用对话起草巡检:用户一句话描述需求 → 发起智能体对话(起草巡检 Skill)→ 智能体建成未启用的巡检,
// 对话里给「检查并启用」卡片,用户在计划页检查、修改后启用。
@@ -1,6 +1,5 @@
import type { ScheduledJob } from "@umt/contracts";
import { History } from "lucide-react";
import { Link } from "react-router";
import { useScheduleRuns } from "~/api/schedules.ts";
import { DetailSheet } from "~/components/console/detail-sheet.tsx";
import { EmptyState, ErrorState, LoadingState } from "~/components/console/empty-state.tsx";
@@ -9,6 +8,7 @@ import { StatusBadge } from "~/components/console/status-badge.tsx";
import { useListPagination } from "~/components/console/use-list-pagination.ts";
import { Pagination } from "~/components/ui/pagination.tsx";
import { agentRunLabel } from "~/lib/labels.ts";
import { Link } from "~/lib/router-compat.tsx";
import { describeSchedule, formatClock, formatMs, RUN_STATUS, TRIGGER_LABEL } from "./labels.ts";
/** 历史抽屉:最近 50 次运行(新→旧) */
@@ -2,7 +2,6 @@ import { useQueryClient } from "@tanstack/react-query";
import { SCHEDULE_CHANGED_EVENT, type ScheduledJob } from "@umt/contracts";
import { AlertTriangle, Bot, CalendarClock, Plus, Sparkles } from "lucide-react";
import { type ReactNode, useEffect, useRef, useState } from "react";
import { useLocation } from "react-router";
import { usePiUpstreamModels, usePiUpstreams } from "~/api/pi.ts";
import { useScheduleBoard } from "~/api/schedules.ts";
import { EmptyState, ErrorState, LoadingState } from "~/components/console/empty-state.tsx";
@@ -10,6 +9,7 @@ import { useListPagination } from "~/components/console/use-list-pagination.ts";
import { Button } from "~/components/ui/button.tsx";
import { Pagination } from "~/components/ui/pagination.tsx";
import { qk } from "~/lib/query-keys.ts";
import { useLocation } from "~/lib/router-compat.tsx";
import { useSse } from "~/lib/sse.ts";
import { AgentCheckCard, type DefaultUpstream } from "./agent-check-card.tsx";
import { AgentCheckDialog } from "./agent-check-dialog.tsx";