From b513a0d56c1d602d53a823a8993d30191f522be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=87=AF?= Date: Sat, 20 Jun 2026 20:05:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(roundtable):=20=E6=B7=B1=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AD=A5=E4=BB=BB=E5=8A=A1/=E8=A1=8C?= =?UTF-8?q?=E5=8A=A8=E5=B1=95=E7=A4=BA=20+=20xdfx=20=E8=A1=8C=E5=8A=A8?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=8E=A5=E5=85=A5=E4=BC=9A=E5=95=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Step1 深链接(taskId)下:左栏顶部「业务链选择」隐藏,改显当前任务(rwfx/3qfx:任务名称+描述) 或当前行动(xdfx:行动名称+叙事);顶栏「业务链条」入口隐藏;「新建任务」改「重新分析」 (复位 autoStarted + resetToStep1,对同一任务重做意图分析) - xdfx 行动详情接入会商:fetchActionDetail 取到即 persistActionDetail 缓存;新增 readActionDetail/persistActionDetail + ACTION_DETAIL_STORAGE_KEY;resolveTaskDeeplinkTarget 会商分支为 xdfx 把 actionId/actionName 带入 roundtablePrefill - xdfx 首条交给任务理解的消息 = 任务名称 + 任务描述 + 行动名称 - 「原任务已有结果」(目的树预览 headerLeftSlot) 仅 rwfx-A(6BF) 显示 注:行动详情 mock(actionName/narration) 在 config.yaml(按惯例不提交,单独管理)。 Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend-web/src/core/auth/task-deeplink.ts | 39 ++++- .../pages/RoundtablePlanningPage.tsx | 136 ++++++++++++++++-- 2 files changed, 160 insertions(+), 15 deletions(-) diff --git a/frontend-web/src/core/auth/task-deeplink.ts b/frontend-web/src/core/auth/task-deeplink.ts index c8a2322c..8a149342 100644 --- a/frontend-web/src/core/auth/task-deeplink.ts +++ b/frontend-web/src/core/auth/task-deeplink.ts @@ -35,6 +35,9 @@ export interface CopTaskDetail { /** 任务详情整包暂存的 sessionStorage key(目标页/后续可读取)。 */ export const COP_TASK_DETAIL_STORAGE_KEY = "login.copTaskDetail"; +/** 行动详情整包暂存的 sessionStorage key(xdfx 行动分析:会商/单智能体读取行动名称/叙事)。 */ +export const ACTION_DETAIL_STORAGE_KEY = "login.actionDetail"; + /** goPath 基础码 → 业务码(配置管理 businessCode)。 */ const GOPATH_BUSINESS_CODE: Record = { "3qfx": "3Q", // 三情分析 @@ -111,6 +114,25 @@ export function readCopTaskDetail(): CopTaskDetail | null { } } +/** 把行动详情整包暂存到 sessionStorage(xdfx 行动分析用;隐私模式/quota 异常时静默失败)。 */ +export function persistActionDetail(detail: ActionDetail): void { + try { + sessionStorage.setItem(ACTION_DETAIL_STORAGE_KEY, JSON.stringify(detail)); + } catch { + /* noop */ + } +} + +/** 读取暂存的行动详情(会商左上角「当前行动」、单智能体行动详情卡都可读)。 */ +export function readActionDetail(): ActionDetail | null { + try { + const raw = sessionStorage.getItem(ACTION_DETAIL_STORAGE_KEY); + return raw ? (JSON.parse(raw) as ActionDetail) : null; + } catch { + return null; + } +} + /** 行动详情接口 ``{action_detail_url}/{actionId}`` 返回的 ``data`` 字段(xdfx 行动分析用)。 */ export interface ActionDetail { /** 行动id(深链 ?taskId= 传入的就是它)。 */ @@ -148,7 +170,7 @@ export async function fetchActionDetail(actionId: string): Promise; - return { + const detail: ActionDetail = { id: d.id != null ? String(d.id) : "", taskId: d.taskId != null ? String(d.taskId) : "", purposeId: d.purposeId != null ? String(d.purposeId) : "", @@ -157,6 +179,10 @@ export async function fetchActionDetail(actionId: string): Promise { + autoStartedRef.current = false; + resetToStep1(); + triggerToast("🔄 已重新分析当前任务"); + }, [resetToStep1, triggerToast]); + // 无界抽屉保活复用:父页面重开抽屉时 `bus.$emit('roundtable:reset')` → 子应用回到第一步。 // 非无界环境下 onWujieEvent 返回 no-op,安全无副作用。 useEffect(() => { @@ -1857,7 +1878,8 @@ export default function RoundtablePlanningPage() { )} - {!inWujieEmbed && ( + {/* 深链接(taskId)模式:业务链由 businessCode 自动决定,隐藏手动「业务链条」入口。 */} + {!inWujieEmbed && !prefillRef.current?.taskId && ( )} - + {/* 深链接(taskId)模式:任务固定,把「新建任务」换成「重新分析」——清空会话、对同一任务重做意图分析。 */} + {prefillRef.current?.taskId ? ( + + ) : ( + + )}