Files
deerflow-code/frontend-web/src/core/page-layout/host-nested-surface.ts
T

22 lines
1.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 外部系统 iframe 深链套用的页面:单智能体问答、多智能体会商、大屏绘制。
* 这些路由只给宿主嵌套,不走全量 Header / PageSidebar;chrome 由路径决定,
* 不依赖(也不改写)同源 iframe 共用的 `embed.session`。
*/
/** 任务管理下的深链会商(goPath=`*-A`)。 */
const TASK_ROUNDTABLE_RE =
/\/task-management\/(?:plan-task-sentiment|plan-task\/plan-task-fx|plan-task\/plan-task-action)\/roundtable(?:\/|$)/;
/** 任务管理下的深链单智能体问答(含 agentfx)。 */
const TASK_AGENT_CHATS_RE =
/\/task-management\/(?:plan-task-sentiment|plan-task\/plan-task-fx|plan-task\/plan-task-action|plan-task-agentfx)\/agent\/[^/]+\/chats/;
export function isHostNestedSurfacePath(pathname: string): boolean {
const path = (pathname || "").split("?")[0] || "";
if (path.includes("/strategy/dashboard-agent")) return true;
if (TASK_ROUNDTABLE_RE.test(path)) return true;
if (TASK_AGENT_CHATS_RE.test(path)) return true;
return false;
}