feat: smart direct-execute homepage import entry
This commit is contained in:
@@ -483,6 +483,7 @@
|
||||
- 全局 `生成文案` 旧入口也已经做成相同分流:优先围绕最近完成任务直接生成,只有没有可承接任务时才回退到旧文案表单。
|
||||
# 2026-04-05
|
||||
|
||||
- intake: 遗留 `导入主页` 入口现在会优先复用当前选中对标的主页链接 direct-execute,只有缺少选中对象或主页链接时才回退到表单。
|
||||
- agent: 遗留 `创建 Agent` 入口现在也会优先 direct-execute,当前项目已就绪时直接创建 Agent,只有缺上下文时才回退到旧表单。
|
||||
- pipeline: 全局旧入口 `AI 视频 / 实拍剪辑` 现在也会优先围绕最近完成任务 direct-execute,只有没有可承接任务时才回退到旧表单。
|
||||
- review: `任务详情 -> 写复盘` 旧入口改成 direct-execute,带 `source_job_id` 直接生成复盘草稿,不再优先打开旧复盘表单。
|
||||
|
||||
@@ -12009,6 +12009,19 @@ document.addEventListener("click", async (event) => {
|
||||
return;
|
||||
}
|
||||
if (name === "open-import-homepage") {
|
||||
const selectedAccount = getSelectedAccountRow();
|
||||
const sourceUrl = String(getAccountProfileUrl(selectedAccount) || "").trim();
|
||||
if (selectedAccount?.id && sourceUrl) {
|
||||
await runDirectDiscoveryAction("import-homepage", {
|
||||
source_url: sourceUrl,
|
||||
title: `${getAccountName(selectedAccount) || "当前对标"} 对标主页`,
|
||||
handle: getAccountHandle(selectedAccount) || ""
|
||||
}, {
|
||||
busyLabel: "正在把当前对标接入项目...",
|
||||
errorTitle: "导入主页失败"
|
||||
});
|
||||
return;
|
||||
}
|
||||
openImportHomepageAction();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1048,6 +1048,9 @@ test("playbook and review high-frequency actions now reuse direct execute handle
|
||||
assert.match(clickActions, /name === "open-create-assistant"[\s\S]*const project = getSelectedProject\(\)/);
|
||||
assert.match(clickActions, /name === "open-create-assistant"[\s\S]*runDirectWorkbenchAction\("create-assistant"/);
|
||||
assert.match(clickActions, /name === "open-create-assistant"[\s\S]*openCreateAssistantAction\(\)/);
|
||||
assert.match(clickActions, /name === "open-import-homepage"[\s\S]*const selectedAccount = getSelectedAccountRow\(\)/);
|
||||
assert.match(clickActions, /name === "open-import-homepage"[\s\S]*runDirectDiscoveryAction\("import-homepage"/);
|
||||
assert.match(clickActions, /name === "open-import-homepage"[\s\S]*openImportHomepageAction\(\)/);
|
||||
});
|
||||
|
||||
test("main agent landing notices expose a compact mobile follow-up strip", () => {
|
||||
|
||||
Reference in New Issue
Block a user