- 3qfx/xdfx 单智能体改走任务工作区(TaskFxWorkspace):按 taskId+agent_id 隔离的 1:N 对话列表;3qfx 纯绑定(taskBind 自动发开场信息),xdfx 带目的树闸门(taskGate) - 左上角「当前任务」卡片:留存查询到的任务名称+简介(readCopTaskDetail) - rwfx 工作区新增「切换到三情分析」按钮,带同一 taskId 进入 3qfx - xdfx 深链传入的是行动id:resolveDeeplinkTaskId 经 action 接口解析出真正任务id (可配置 action_detail_url + action_test/mock.action_detail,离线可测) - 目的树面板「弹框查看」旁新增可配置「3q详情」链接(detail_3q_url + ?id=任务id) - AgentChatPage 拆分 taskGate/taskBind;use-task-threads 增加 agentId 过滤隔离 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
66 lines
2.9 KiB
Python
66 lines
2.9 KiB
Python
"""任务深链(``goPath=rwfx`` / ``xdfx``)的「目的树闸门 + 行动→任务解析 + 跳转」配置。
|
|
|
|
前端(登录深链流程)通过公开只读接口 ``GET /api/public/config/task-deeplink``
|
|
读取这一段:所有外部地址都是**完整 URL**(调用时仅追加 ``?taskId=`` / ``?id=`` 或 ``/{actionId}`` 路径段),
|
|
随时改 ``config.yaml`` 即可(Gateway 有 mtime 热重载,无需重新构建前端)。
|
|
|
|
测试开关(线上接口未通时用假数据,互相独立):
|
|
- ``test`` → 目的树查询(``purpose_detail_url``)走 ``mock.purpose_detail`` 假数据。
|
|
- ``delete_test`` → 删除接口(``delete_url``)走 ``mock.delete`` 假数据(该接口尚未开发完时打开)。
|
|
- ``action_test`` → 行动详情接口(``action_detail_url``)走 ``mock.action_detail`` 假数据。
|
|
xdfx 深链传入的是「行动id」,需先调该接口拿 ``data.taskId`` 解析出真正的「任务id」。
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class TaskDeeplinkConfig(BaseModel):
|
|
"""rwfx 任务深链的目的树查询 / 删除接口与跳转页地址。"""
|
|
|
|
model_config = ConfigDict(extra="allow")
|
|
|
|
test: bool = Field(
|
|
default=False,
|
|
description="为真时前端目的树查询走 mock.purpose_detail 假数据(不打真实接口)",
|
|
)
|
|
delete_test: bool = Field(
|
|
default=False,
|
|
description="为真时前端删除接口走 mock.delete 假数据(删除接口未开发完时打开)",
|
|
)
|
|
action_test: bool = Field(
|
|
default=False,
|
|
description="为真时前端「行动→任务」解析走 mock.action_detail 假数据(不打真实接口)",
|
|
)
|
|
purpose_detail_url: str = Field(
|
|
default="",
|
|
description="目的树查询完整 URL,调用时追加 ?taskId=",
|
|
)
|
|
action_detail_url: str = Field(
|
|
default="",
|
|
description="行动详情接口基址(xdfx 行动→任务),调用时追加 /{actionId} 路径段;返回 data.taskId 为真正任务id",
|
|
)
|
|
detail_3q_url: str = Field(
|
|
default="",
|
|
description="「3q详情」详情页 URL(rwfx 目的树面板的链接),跳转时追加 ?id=(任务id)",
|
|
)
|
|
delete_url: str = Field(
|
|
default="",
|
|
description="删除完整 URL,调用时追加 ?taskId=",
|
|
)
|
|
treemap_edit_url: str = Field(
|
|
default="",
|
|
description="B 系统树形完整编辑页 URL,跳转时追加 ?id=",
|
|
)
|
|
treemap_next_url: str = Field(
|
|
default="",
|
|
description="B 系统树形下一步页 URL,跳转时追加 ?id=",
|
|
)
|
|
mock: dict[str, Any] = Field(
|
|
default_factory=dict,
|
|
description="test/delete_test/action_test 为真时返回的假数据:{purpose_detail: {...}, delete: {message, success}, action_detail: {state, msg, data: {taskId, ...}}}",
|
|
)
|