diff --git a/frontend-web/src/lib/desensitize.ts b/frontend-web/src/lib/desensitize.ts index 38546f01..5440451d 100644 --- a/frontend-web/src/lib/desensitize.ts +++ b/frontend-web/src/lib/desensitize.ts @@ -11,6 +11,10 @@ * {@link DESENSITIZE_MAP}。 */ export const SEED_DESENSITIZE_MAP: Readonly> = Object.freeze({ + // 任务工作区业务名 → 业务码(脱敏展示)。整词在前,优先于下面更短的「任务」「行动」匹配。 + 任务分析: "rwfx", + 三情分析: "3qfx", + 行动分析: "xdfx", 方案: "FA", 设计: "SJ", 任务: "RW", diff --git a/frontend-web/src/strategy-components/components/task-components/TaskFxWorkspace.tsx b/frontend-web/src/strategy-components/components/task-components/TaskFxWorkspace.tsx index ace8bd25..91a337f0 100644 --- a/frontend-web/src/strategy-components/components/task-components/TaskFxWorkspace.tsx +++ b/frontend-web/src/strategy-components/components/task-components/TaskFxWorkspace.tsx @@ -148,9 +148,9 @@ function TaskJumpBar({ business, taskId }: { business: TaskBusiness; taskId: str key={btn.id} className="h-11 gap-2 border-transparent bg-[var(--color-main)] px-6 text-base text-white shadow-sm hover:bg-[var(--brand-950)]" onClick={() => handleRun(btn)} - title={btn.label} + title={desensitize(btn.label)} > - {btn.label} + {desensitize(btn.label)} {btn.linkType === "url" ? ( ) : btn.linkType === "purpose" ? ( @@ -191,7 +191,7 @@ function TaskConversationsList({ const navigate = useNavigate(); const { threads, isLoading } = useTaskThreads(taskId, agentId); const currentThreadId = useMemo(() => parseThreadId(pathname, chatsBase), [pathname, chatsBase]); - const businessName = TASK_BUSINESSES.find((b) => b.code === business)?.name ?? ""; + const businessName = desensitize(TASK_BUSINESSES.find((b) => b.code === business)?.name ?? ""); return (
diff --git a/frontend-web/src/strategy-components/components/task-components/TaskPurposePanel.tsx b/frontend-web/src/strategy-components/components/task-components/TaskPurposePanel.tsx index 56bc1f1c..e1b052b5 100644 --- a/frontend-web/src/strategy-components/components/task-components/TaskPurposePanel.tsx +++ b/frontend-web/src/strategy-components/components/task-components/TaskPurposePanel.tsx @@ -31,6 +31,7 @@ import { type TaskPurposeResult, } from "@/core/auth/task-purpose"; import { fetchTaskIdFromAction } from "@/core/auth/task-deeplink"; +import { desensitize } from "@/lib/desensitize"; import { cn } from "@/lib/utils"; /** 目的树表格:拍平成行,列数随数据自适应;层级缺失补空、字段变动不崩。 */ @@ -58,7 +59,7 @@ export function PurposeTable({ tree, className }: { tree: PurposeTreeNode[]; cla key={i} className="bg-muted/60 border-border/60 sticky top-0 border px-3 py-1.5 text-left font-medium whitespace-nowrap" > - {h} + {desensitize(h)} ))} @@ -72,9 +73,9 @@ export function PurposeTable({ tree, className }: { tree: PurposeTreeNode[]; cla {cell ? ( <> - {cell.text || "(空)"} + {cell.text ? desensitize(cell.text) : "(空)"} {cell.reason ? ( - 理由:{cell.reason} + 理由:{desensitize(cell.reason)} ) : null} ) : (