From 1ea00ff5e4a27a3a8e12cf78893732d219ede38b Mon Sep 17 00:00:00 2001 From: kris Date: Sun, 5 Apr 2026 08:24:25 +0800 Subject: [PATCH] feat: direct-execute global pipeline actions --- CHANGELOG.md | 1 + web/storyforge-web-v4/assets/app.js | 4 ++-- web/storyforge-web-v4/tests/workbench-pages.test.mjs | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 526901a..3d5e078 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -478,3 +478,4 @@ - `runDirectWorkbenchAction / runDirectDiscoveryAction` 也已支持显式 `projectId / platform`,所以这批旧表单里的“归属项目 / 平台”选择不会在切换到执行器后失效。 - SQLite 连接现在保持 `WAL` 优先,但在临时盘或受限文件系统无法启用 `WAL` 时会自动回退到 `DELETE`,避免测试环境和受限部署因为 `disk I/O error` 直接起不来。 - `generate-copy` 这条执行链现在会直接推荐回到“最近生成”结果区,而不是再打开旧文案表单;LAN smoke 也同步把 `track-account / import-video-link / import-text / generate-copy / create-assistant` 纳入 action-registry 护栏。 +- 全局 `AI 视频 / 实拍剪辑` 主按钮也已经切到 direct-execute,会直接承接最近可派生任务,不再优先打开旧表单。 diff --git a/web/storyforge-web-v4/assets/app.js b/web/storyforge-web-v4/assets/app.js index c282ece..c5a15c0 100644 --- a/web/storyforge-web-v4/assets/app.js +++ b/web/storyforge-web-v4/assets/app.js @@ -204,13 +204,13 @@ const INTEGRATION_META = { const PIPELINE_GUARDS = { aiVideo: { label: "AI 视频", - openAction: "open-ai-video", + openAction: "direct-create-ai-video", jobAction: "direct-create-ai-video", dependencies: ["n8n", "huobao"] }, realCut: { label: "实拍剪辑", - openAction: "open-real-cut", + openAction: "direct-create-real-cut", jobAction: "direct-create-real-cut", dependencies: ["n8n", "cutvideo"] } diff --git a/web/storyforge-web-v4/tests/workbench-pages.test.mjs b/web/storyforge-web-v4/tests/workbench-pages.test.mjs index a8b2a3e..c878fc1 100644 --- a/web/storyforge-web-v4/tests/workbench-pages.test.mjs +++ b/web/storyforge-web-v4/tests/workbench-pages.test.mjs @@ -399,6 +399,8 @@ test("pipeline follow-up tags route source-job actions through direct execute ha const pipelineGuards = extractBetween(APP, "const PIPELINE_GUARDS = {", "const ONELINER_INTENT_LABELS = {"); const clickActions = extractBetween(APP, "document.addEventListener(\"click\", async (event) => {", "document.addEventListener(\"submit\", async (event) => {"); + assert.match(pipelineGuards, /openAction:\s*"direct-create-ai-video"/); + assert.match(pipelineGuards, /openAction:\s*"direct-create-real-cut"/); assert.match(pipelineGuards, /jobAction:\s*"direct-create-ai-video"/); assert.match(pipelineGuards, /jobAction:\s*"direct-create-real-cut"/); assert.match(clickActions, /name === "direct-create-ai-video"[\s\S]*if \(action\.dataset\.jobId\) \{[\s\S]*closeActionModal\(\);/);