|
|
@@ -52,6 +52,7 @@ import type {
|
|
|
SavedWorkflowsOpenRunParams,
|
|
|
} from "@/settings/saved-workflows/SavedWorkflowsSection.js";
|
|
|
import { AutomationsMainBreadcrumbFrame } from "@/settings/AutomationsMainBreadcrumbFrame.js";
|
|
|
+import { TaskDispatchModule } from "@/task-dispatch/TaskDispatchModule.js";
|
|
|
import { PluginStorePage } from "@/settings/PluginStorePage.js";
|
|
|
import { TaskFindDialog } from "@/quickpick/TaskFindDialog.js";
|
|
|
import { WebRemoteControlMobileShell } from "@/WebRemoteControlMobileShell.js";
|
|
|
@@ -1272,6 +1273,9 @@ export const WorkspaceShellLayout = memo(
|
|
|
const showChatMainView = useCallback(() => {
|
|
|
onWorkspaceMainViewChange("chat");
|
|
|
}, [onWorkspaceMainViewChange]);
|
|
|
+ const handleOpenTaskDispatchMain = useCallback(() => {
|
|
|
+ onWorkspaceMainViewChange("task-dispatch");
|
|
|
+ }, [onWorkspaceMainViewChange]);
|
|
|
const primaryNavigationBack =
|
|
|
workspaceMainView === "plugin-store"
|
|
|
? handleManageInstalledPlugins
|
|
|
@@ -1282,10 +1286,11 @@ export const WorkspaceShellLayout = memo(
|
|
|
if (
|
|
|
isWebRemoteControlShell &&
|
|
|
(workspaceMainView === "automations" ||
|
|
|
+ workspaceMainView === "task-dispatch" ||
|
|
|
workspaceMainView === "plugin-store")
|
|
|
) {
|
|
|
// 修复原因:手机远控复用桌面 shell 时可能保留上一次主视图状态;
|
|
|
- // 远控不承载 Automations,必须立即回落到 continuous/replayable 边界之外的聊天页。
|
|
|
+ // 远控不承载 Automations/任务分发,必须立即回落到 continuous/replayable 边界之外的聊天页。
|
|
|
onWorkspaceMainViewChange("chat");
|
|
|
}
|
|
|
}, [isWebRemoteControlShell, onWorkspaceMainViewChange, workspaceMainView]);
|
|
|
@@ -2039,6 +2044,7 @@ export const WorkspaceShellLayout = memo(
|
|
|
// 手机远控无 active task 时仍不渲染桌面 chrome,继续遵守 replayable overlay 边界。
|
|
|
const shouldRenderMainViewHeader =
|
|
|
workspaceMainView !== "automations" &&
|
|
|
+ workspaceMainView !== "task-dispatch" &&
|
|
|
workspaceMainView !== "plugin-store";
|
|
|
const shouldRenderWorkspaceHeader =
|
|
|
shouldRenderMainViewHeader && (activeTaskId !== null || isDesktop);
|
|
|
@@ -2216,6 +2222,32 @@ export const WorkspaceShellLayout = memo(
|
|
|
</div>
|
|
|
</AutomationsMainBreadcrumbFrame>
|
|
|
</main>
|
|
|
+ ) : workspaceMainView === "task-dispatch" &&
|
|
|
+ !isWebRemoteControlShell ? (
|
|
|
+ <main className="flex h-full min-h-0 flex-1 flex-col bg-background">
|
|
|
+ <AutomationsMainBreadcrumbFrame
|
|
|
+ isDesktop={Boolean(isDesktop)}
|
|
|
+ sectionLabel={intl.formatMessage({
|
|
|
+ id: "taskDispatch.module.title",
|
|
|
+ })}
|
|
|
+ ariaLabel={intl.formatMessage({
|
|
|
+ id: "taskDispatch.module.title",
|
|
|
+ })}
|
|
|
+ >
|
|
|
+ <div className="min-h-0 flex-1 overflow-y-auto [scrollbar-gutter:stable]">
|
|
|
+ <ScopedErrorBoundary
|
|
|
+ scope="task-dispatch-main"
|
|
|
+ resetKeys={workspaceOnlyResetKeys}
|
|
|
+ variant="panel"
|
|
|
+ className="min-h-full"
|
|
|
+ >
|
|
|
+ <div className="mx-auto flex h-full min-h-0 w-full max-w-5xl flex-col px-4 py-4 md:px-6 md:py-6">
|
|
|
+ <TaskDispatchModule />
|
|
|
+ </div>
|
|
|
+ </ScopedErrorBoundary>
|
|
|
+ </div>
|
|
|
+ </AutomationsMainBreadcrumbFrame>
|
|
|
+ </main>
|
|
|
) : workspaceMainView === "plugin-store" &&
|
|
|
!isWebRemoteControlShell ? (
|
|
|
<main className="flex h-full min-h-0 flex-1 flex-col bg-background">
|
|
|
@@ -2459,6 +2491,8 @@ export const WorkspaceShellLayout = memo(
|
|
|
onOpenCommandCenter={handleOpenCommandCenter}
|
|
|
onOpenAutomations={handleOpenAutomations}
|
|
|
automationsActive={workspaceMainView === "automations"}
|
|
|
+ onOpenTaskDispatch={handleOpenTaskDispatchMain}
|
|
|
+ taskDispatchActive={workspaceMainView === "task-dispatch"}
|
|
|
onOpenPluginStore={handleOpenPluginStore}
|
|
|
pluginStoreActive={workspaceMainView === "plugin-store"}
|
|
|
onFileTreeOpenChange={setIsSidebarFileTreeOpen}
|
|
|
@@ -2856,7 +2890,9 @@ export const WorkspaceShellLayout = memo(
|
|
|
</section>
|
|
|
</ResizablePanel>
|
|
|
{isWebRemoteControlShell ||
|
|
|
- (workspaceMainView !== "automations" && workspaceMainView !== "plugin-store") ? (
|
|
|
+ (workspaceMainView !== "automations" &&
|
|
|
+ workspaceMainView !== "task-dispatch" &&
|
|
|
+ workspaceMainView !== "plugin-store") ? (
|
|
|
<AnimatedTerminalPanel
|
|
|
frameClassName={cn(
|
|
|
isSidePaneVisible ? "rounded-[var(--workspace-panel-radius)] border border-border" : resolveWorkspaceShellWindowChromeClass({
|