From 25d0a074ca9080a230f54ae9570df2918cd86421 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 7 Oct 2026 02:11:33 +0800 Subject: [PATCH] =?UTF-8?q?copy:=20=E5=B7=A1=E6=A3=80=E7=9B=AE=E6=A0=87?= =?UTF-8?q?=E4=B8=8E=E5=BC=95=E6=93=8E=E7=BB=9F=E8=AE=A1=E6=91=98=E8=A6=81?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E3=80=8C=E5=BE=85=E5=A4=84=E7=90=86=E3=80=8D?= =?UTF-8?q?;=E6=A0=BC=E5=BC=8F=E5=8C=96=E6=94=B9=E5=8A=A8=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei --- apps/server/src/modules/auth-settings/engine-routes.ts | 2 +- apps/server/src/modules/file-manager/trash.ts | 3 +-- apps/server/src/modules/schedules/agent-checks.ts | 2 +- apps/server/test/schedules/render-goal.test.ts | 2 +- apps/web/app/components/library/scrape-panel.tsx | 4 +++- apps/web/app/routes/console/organize.tsx | 3 ++- packages/contracts/src/api/system.ts | 2 +- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/server/src/modules/auth-settings/engine-routes.ts b/apps/server/src/modules/auth-settings/engine-routes.ts index d0130460..c4b05244 100644 --- a/apps/server/src/modules/auth-settings/engine-routes.ts +++ b/apps/server/src/modules/auth-settings/engine-routes.ts @@ -43,7 +43,7 @@ const D = { method: "get", path: "/engine/stats", scope: "admin", - summary: "按状态计数 / 最老待处理 / 活跃 worker 快照", + summary: "按状态计数 / 最早排队的运行 / 活跃 worker", response: EngineStats, tags, }, diff --git a/apps/server/src/modules/file-manager/trash.ts b/apps/server/src/modules/file-manager/trash.ts index 1a39065e..dbfba52d 100644 --- a/apps/server/src/modules/file-manager/trash.ts +++ b/apps/server/src/modules/file-manager/trash.ts @@ -206,8 +206,7 @@ export async function deleteFiles( body: FilesDeleteRequest, ): Promise { if (body.mode === "permanent") { - if (!d.options.allowPermanentDelete) - throw new FilesError("permanent_disabled", "永久删除没有开启。改用回收站"); + if (!d.options.allowPermanentDelete) throw new FilesError("permanent_disabled", "永久删除没有开启。改用回收站"); if (!isAdminSession(principal)) throw new FilesError("forbidden", "永久删除只允许控制台管理员会话"); } const downloads = await managedDownloads(d); diff --git a/apps/server/src/modules/schedules/agent-checks.ts b/apps/server/src/modules/schedules/agent-checks.ts index 49083e36..8828939d 100644 --- a/apps/server/src/modules/schedules/agent-checks.ts +++ b/apps/server/src/modules/schedules/agent-checks.ts @@ -33,7 +33,7 @@ export const BUILTIN_AGENT_CHECKS: { everyMs: 6 * HOUR, config: { goalTemplate: - "巡检待处理({{now}}):有 {{openDecisions}} 条未关闭的需要处理的事项。逐条查看证据,按紧急程度排序," + + "巡检事项({{now}}):有 {{openDecisions}} 条未关闭的需要处理的事项。逐条查看证据,按紧急程度排序," + "给出处理建议和理由。只读,不做任何变更。", capabilityAllowlist: [...INVESTIGATE_CAPABILITIES], budget: { maxToolCalls: 20, maxDurationSec: 300 }, diff --git a/apps/server/test/schedules/render-goal.test.ts b/apps/server/test/schedules/render-goal.test.ts index 8d17ba22..21fdcca6 100644 --- a/apps/server/test/schedules/render-goal.test.ts +++ b/apps/server/test/schedules/render-goal.test.ts @@ -14,7 +14,7 @@ describe("renderGoal(巡检目标模板)", () => { } const pending = BUILTIN_AGENT_CHECKS.find((c) => c.key === "check.pending"); expect(renderGoal(pending?.config.goalTemplate ?? "", now, facts)).toContain( - "巡检待处理(2026-09-28T18:53:50.468Z):有 3 条未关闭的待处理事项", + "巡检事项(2026-09-28T18:53:50.468Z):有 3 条未关闭的需要处理的事项", ); }); diff --git a/apps/web/app/components/library/scrape-panel.tsx b/apps/web/app/components/library/scrape-panel.tsx index 75876cad..a6afebc0 100644 --- a/apps/web/app/components/library/scrape-panel.tsx +++ b/apps/web/app/components/library/scrape-panel.tsx @@ -99,7 +99,9 @@ export function ScrapeRecordView({ record: s, showPath = false }: { record: Scra
{SCRAPE_STATUS[s.status].label} - {showPath ? {s.path || "(登记目录本身)"} : null} + {showPath ? ( + {s.path || "(登记目录本身)"} + ) : null} {done && (files.length || s.status === "succeeded") ? ( {scrapeCounts(s) || "没有要写的文件"} ) : null} diff --git a/apps/web/app/routes/console/organize.tsx b/apps/web/app/routes/console/organize.tsx index 69dc0523..aab42b0e 100644 --- a/apps/web/app/routes/console/organize.tsx +++ b/apps/web/app/routes/console/organize.tsx @@ -100,7 +100,8 @@ const when = (r: Rec) => r.finishedAt ?? r.startedAt ?? r.createdAt; /** 状态:成功不加徽章,其余徽章 + 一句原因;需要处理的再给行内动作 */ function StatusCell({ r, onReorganize }: { r: Rec; onReorganize?: () => void }) { const progress = recordFileProgress(r); - if (r.status === "succeeded" && !r.reason && !r.attention) return 已整理; + if (r.status === "succeeded" && !r.reason && !r.attention) + return 已整理; const line = attentionLine(r) ?? reasonLine(r.reason); return (
diff --git a/packages/contracts/src/api/system.ts b/packages/contracts/src/api/system.ts index e2a39897..6a9a5c02 100644 --- a/packages/contracts/src/api/system.ts +++ b/packages/contracts/src/api/system.ts @@ -218,7 +218,7 @@ export const systemApi = { method: "get", path: "/engine/stats", scope: "admin", - summary: "按状态计数 / 最老待处理 / 活跃 worker 快照", + summary: "按状态计数 / 最早排队的运行 / 活跃 worker", response: ops.EngineStats, }), cancel: ep({