fix(wechat): cancel sole active scheduled task in inbound without Goose

When a user has exactly one active automation task, cancel it by taskId
after listTasks instead of relying on Goose when the LLM provider fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-29 12:36:19 +08:00
parent 43ec144540
commit d8463829f7
4 changed files with 69 additions and 6 deletions
@@ -48,6 +48,7 @@ description: 处理定时自动任务(Scheduled Automation):澄清执行
1. 先判断用户是要**创建**、**查询**、**取消**还是**更新规范**。
2. 缺时间或缺任务内容时,一次只追问最小必要信息。
3. **取消 / 更新**前必须先 `scheduled_task_list`,用返回的 `taskId` 操作;由你理解用户指哪一条,不要猜 titleMatch。
- 微信 inbound:若用户只有 1 个 active 任务,会直接取消;多个 active 任务时才进入 Goose 让你选 taskId。
4. **更新规范**:用户补充格式标准、参考页面 URL、排版约束时,对目标任务调用 `scheduled_task_update_spec``mergeTaskSpec: true` 追加说明。
5. 创建成功后,用用户能理解的话说明何时执行、执行什么、recurrence、推送通道。
6. 若提示里给出了 `sourceMessageId`,调用 `scheduled_task_create` 时必须原样传入。