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
+5
View File
@@ -332,6 +332,11 @@ export function formatScheduledTaskListReply(tasks = []) {
return lines.join('\n');
}
export function formatScheduledTaskCancelReply(task) {
const title = String(task?.title ?? '定时任务').trim();
return `已取消定时任务:${title}`;
}
export {
extractScheduledTaskSpec,
isMetaScheduledTaskSpec,