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 { useQueryClient } from "@tanstack/react-query";
import type { EngineRun } from "@umt/contracts";
import { FileStack, ListOrdered, Loader2, RefreshCw } from "lucide-react";
import { Link } from "react-router";
import { useDownloadTask } from "~/api/downloads.ts";
import { useEngineRun, useEngineRuns, useEngineRunsPage } from "~/api/engine.ts";
import { useScrapeRecords } from "~/api/files.ts";
@@ -16,6 +15,7 @@ import { Button } from "~/components/ui/button.tsx";
import { Pagination } from "~/components/ui/pagination.tsx";
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "~/components/ui/sheet.tsx";
import { qk } from "~/lib/query-keys.ts";
import { Link } from "~/lib/router-compat.tsx";
import { useSse } from "~/lib/sse.ts";
import { organizeQueueStage, organizeRunInput, scrapeQueueStage } from "./queue-model.ts";
import { queueCountLabel } from "./record-filter-model.ts";
@@ -2,8 +2,8 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import type { PublicOrganizationRecord, RecordAttention } from "@umt/contracts";
import { createElement, type ReactNode } from "react";
import { renderToStaticMarkup } from "react-dom/server";
import { MemoryRouter } from "react-router";
import { expect, it, vi } from "vitest";
import { MemoryRouter } from "~/lib/router-compat.tsx";
import { OrganizeRecordSheet } from "./organize-record-sheet.tsx";
const state = vi.hoisted(() => ({ record: null as PublicOrganizationRecord | null }));
@@ -1,7 +1,6 @@
import type { PublicOrganizationFile, PublicPathRef } from "@umt/contracts";
import { ArrowRight, ChevronRight, Trash2, Wand2 } from "lucide-react";
import { useState } from "react";
import { Link } from "react-router";
import { ACTION_LABEL, RECORD_STATUS_LABEL, RECORD_STATUS_TONE, TRIGGER_LABEL, useRecord } from "~/api/records.ts";
import { DetailSection, DetailSheet } from "~/components/console/detail-sheet.tsx";
import { ErrorState, LoadingState } from "~/components/console/empty-state.tsx";
@@ -19,6 +18,7 @@ import { OrganizeWizard } from "~/components/organize-wizard/organize-wizard.tsx
import { Button } from "~/components/ui/button.tsx";
import { actorTypeLabel } from "~/lib/labels.ts";
import { reasonCode, reasonLine } from "~/lib/reasons.ts";
import { Link } from "~/lib/router-compat.tsx";
import { cn, formatBytes, formatDateTime } from "~/lib/utils.ts";
const FILE_STATUS: Record<PublicOrganizationFile["status"], { label: string; tone: StatusTone }> = {
@@ -1,6 +1,5 @@
import { useQuery } from "@tanstack/react-query";
import { FilesScrapeRecordsResult, type ScrapeFileResult } from "@umt/contracts";
import { Link } from "react-router";
import { apiParsed } from "~/api/parse.ts";
import { DetailSection } from "~/components/console/detail-sheet.tsx";
import { ErrorState, LoadingState } from "~/components/console/empty-state.tsx";
@@ -9,6 +8,7 @@ import { taskPath } from "~/components/console/record-sheet.tsx";
import { StatusBadge } from "~/components/console/status-badge.tsx";
import { EXPECTED_SCRAPE_SKIPS, SCRAPE_STATUS, scrapeCounts } from "~/components/library/scrape-panel.tsx";
import { reasonLine } from "~/lib/reasons.ts";
import { Link } from "~/lib/router-compat.tsx";
import { formatDateTime } from "~/lib/utils.ts";
/** 失败的文件,以及缺元数据、认不出集号等不在预期内的跳过 */
@@ -2,9 +2,9 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import type { PublicOrganizationRecord, RecordAttention } from "@umt/contracts";
import { createElement, type ReactNode } from "react";
import { renderToStaticMarkup } from "react-dom/server";
import { MemoryRouter } from "react-router";
import { describe, expect, it } from "vitest";
import { recordNeedsRefresh } from "~/api/records.ts";
import { MemoryRouter } from "~/lib/router-compat.tsx";
import { attentionLine, primaryAction, RecordAttentionActions } from "./record-attention.tsx";
// 整理记录「需要处理」的行内处理(2026-10-06 去掉待处理中心):原因一句话 + 推荐动作,一键执行。
@@ -1,6 +1,5 @@
import type { PublicOrganizationRecord } from "@umt/contracts";
import { BellOff, Bot, ChevronRight, LoaderCircle, Wand2 } from "lucide-react";
import { Link } from "react-router";
import { toast } from "sonner";
import { useAgentIdentifyRecord, useDismissRecordAttention } from "~/api/records.ts";
import { ConfirmDialog } from "~/components/console/confirm-dialog.tsx";
@@ -15,6 +14,7 @@ import { mappingHref } from "~/components/episode-mapping/model.ts";
import { Button } from "~/components/ui/button.tsx";
import { errorMessage } from "~/lib/api.ts";
import { humanizeReason, reasonCode } from "~/lib/reasons.ts";
import { Link } from "~/lib/router-compat.tsx";
import { canReorganize } from "./record-parts.ts";
// 整理记录「需要处理」的行内处理(2026-10-06 去掉待处理中心后,整理侧的问题在这里就地处理):