- 新增 AgentRecentChats 组件,在智能体详情面板底部按 agent_id 展示最近对话 - 调整问答/智能体侧边栏与最近对话列表展示逻辑 - 补充 dashboard-input、task-deeplink 相关配置与线程工具方法 - 后端推荐问题接口标签处理及 position_sync 微调,新增相关测试 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
67 lines
3.2 KiB
Python
67 lines
3.2 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`` 假数据;
|
||
同时 rwfx 进入「3q 是否完成」预检(``selectSqReport``,外部接口不可用)走 ``mock.sq_report`` 假数据。
|
||
- ``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 假数据;同时 rwfx 进入「3q 是否完成」预检(selectSqReport)走 mock.sq_report 假数据(都不打真实接口)",
|
||
)
|
||
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, ...}}, sq_report: {state, msg, data: [...]}}(sq_report 供 rwfx 3q 预检,test 为真时用)",
|
||
)
|