feat: smart direct-execute legacy pipeline actions
This commit is contained in:
@@ -12378,6 +12378,15 @@ document.addEventListener("click", async (event) => {
|
||||
return;
|
||||
}
|
||||
if (name === "open-ai-video") {
|
||||
const fallbackJob = getLatestCompletedProjectJob();
|
||||
if (fallbackJob?.id) {
|
||||
await runDirectWorkbenchAction("create-ai-video", {
|
||||
busyLabel: "正在创建 AI 视频任务...",
|
||||
errorTitle: "创建 AI 视频任务失败",
|
||||
payload: { source_job_id: fallbackJob.id }
|
||||
});
|
||||
return;
|
||||
}
|
||||
openCreateAiVideoAction();
|
||||
return;
|
||||
}
|
||||
@@ -12393,6 +12402,15 @@ document.addEventListener("click", async (event) => {
|
||||
return;
|
||||
}
|
||||
if (name === "open-real-cut") {
|
||||
const fallbackJob = getLatestCompletedProjectJob();
|
||||
if (fallbackJob?.id) {
|
||||
await runDirectWorkbenchAction("create-real-cut", {
|
||||
busyLabel: "正在创建实拍剪辑任务...",
|
||||
errorTitle: "创建实拍剪辑任务失败",
|
||||
payload: { source_job_id: fallbackJob.id }
|
||||
});
|
||||
return;
|
||||
}
|
||||
openCreateRealCutAction();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1039,6 +1039,12 @@ test("playbook and review high-frequency actions now reuse direct execute handle
|
||||
assert.match(clickActions, /name === "open-generate-copy"[\s\S]*openGenerateCopyAction\(\)/);
|
||||
assert.match(clickActions, /name === "open-review-from-job"[\s\S]*runDirectWorkbenchAction\("review-draft"/);
|
||||
assert.match(clickActions, /name === "open-review-from-job"[\s\S]*payload: \{ source_job_id: jobId \}/);
|
||||
assert.match(clickActions, /name === "open-ai-video"[\s\S]*const fallbackJob = getLatestCompletedProjectJob\(\)/);
|
||||
assert.match(clickActions, /name === "open-ai-video"[\s\S]*runDirectWorkbenchAction\("create-ai-video"/);
|
||||
assert.match(clickActions, /name === "open-ai-video"[\s\S]*openCreateAiVideoAction\(\)/);
|
||||
assert.match(clickActions, /name === "open-real-cut"[\s\S]*const fallbackJob = getLatestCompletedProjectJob\(\)/);
|
||||
assert.match(clickActions, /name === "open-real-cut"[\s\S]*runDirectWorkbenchAction\("create-real-cut"/);
|
||||
assert.match(clickActions, /name === "open-real-cut"[\s\S]*openCreateRealCutAction\(\)/);
|
||||
});
|
||||
|
||||
test("main agent landing notices expose a compact mobile follow-up strip", () => {
|
||||
|
||||
Reference in New Issue
Block a user