From 9f6cbb5598e66e67d42df916f8fc038285df681b Mon Sep 17 00:00:00 2001 From: Yaojia Wang Date: Fri, 10 Jul 2026 18:00:36 +0200 Subject: [PATCH] =?UTF-8?q?refactor(frontend):=20=E5=8F=B3=E6=A0=8F?= =?UTF-8?q?=E5=8E=BB=E6=9C=AF=E8=AF=AD=E2=80=94=E2=80=94=E6=9C=AC=E7=AB=A0?= =?UTF-8?q?=E5=8F=82=E8=80=83/AI=20=E5=86=99=E8=BF=99=E7=AB=A0=E4=BC=9A?= =?UTF-8?q?=E5=8F=82=E8=80=83/=E5=86=99=E5=AE=8C=E5=90=8E=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=EF=BC=8C=E5=88=A0=E9=87=8D=E5=A4=8D=E5=8E=BB=E5=AE=A1?= =?UTF-8?q?=E7=A8=BF=EF=BC=88UX=20P1-3=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/workbench/ChapterAssistant.tsx | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/apps/web/components/workbench/ChapterAssistant.tsx b/apps/web/components/workbench/ChapterAssistant.tsx index 32f9230..5f13162 100644 --- a/apps/web/components/workbench/ChapterAssistant.tsx +++ b/apps/web/components/workbench/ChapterAssistant.tsx @@ -1,6 +1,5 @@ "use client"; -import Link from "next/link"; import { Minus, Pin, PinOff, Plus, RotateCcw, Undo2, X } from "lucide-react"; import { ThinkingIndicator } from "@/components/ThinkingIndicator"; @@ -45,11 +44,11 @@ export function AssistantContent({ projectId, chapterNo }: ChapterAssistantProps return (
) : null @@ -58,7 +57,7 @@ export function AssistantContent({ projectId, chapterNo }: ChapterAssistantProps
{injection.loading ? ( -

加载注入信息…

+

加载参考信息…

) : !data ? ( // 首次加载失败:data 仍为空 → 满屏错误框 + 重试。 - +

请检查后端连接后重试。

); @@ -194,7 +187,7 @@ function EntityRow({ entity, pinned, disabled, onTogglePin, onExclude }: EntityR disabled={disabled} aria-pressed={pinned} aria-label={ - pinned ? `取消置顶 ${entity.name}` : `置顶 ${entity.name}(强制注入)` + pinned ? `取消置顶 ${entity.name}` : `置顶 ${entity.name}(一定参考)` } onClick={() => onTogglePin(ref)} className={pinned ? "text-cinnabar" : undefined} @@ -209,7 +202,7 @@ function EntityRow({ entity, pinned, disabled, onTogglePin, onExclude }: EntityR variant="ghost" size="icon" disabled={disabled} - aria-label={`排除 ${entity.name}(不注入本章)`} + aria-label={`排除 ${entity.name}(本章不参考)`} onClick={() => onExclude(ref)} >