fix(wechat): resolve scheduled task cancel via manage LLM instead of hard rules

Use a lightweight LLM over active task lists to pick taskId for cancel,
exclude page.generate from scheduled-task inbound, and remove single-task
auto-cancel so Cursor page generation stays isolated.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-29 13:45:28 +08:00
parent d8463829f7
commit 5de58af9ed
11 changed files with 528 additions and 14 deletions
@@ -33,6 +33,7 @@ export async function bootstrapPortalIntegrationServices({
taskUnifiedService = null,
sessionSnapshotService = null,
wechatScheduleLlmConfigService,
wechatScheduledTaskManageLlmConfigService = null,
wechatIntentRouter = null,
wechatCursorExecutorPolicyService = null,
agentRunGateway = null,
@@ -178,6 +179,7 @@ export async function bootstrapPortalIntegrationServices({
? taskUnifiedService
: null,
wechatScheduleLlmConfigService,
wechatScheduledTaskManageLlmConfigService,
llmProviderService,
chatIntentRouter,
wechatIntentRouter,
@@ -11,6 +11,7 @@ import { isSessionStreamReplayEnabled } from '../session-stream.mjs';
import { createSkillRuntimeAdminConfigService } from '../skill-runtime-admin-config.mjs';
import { createSystemDisclosurePolicyService } from '../system-disclosure-policy.mjs';
import { createWechatScheduleLlmConfigService } from '../wechat-schedule-llm-config.mjs';
import { createWechatScheduledTaskManageLlmConfigService } from '../wechat-scheduled-task-manage-llm-config.mjs';
import { createWechatIntentRouterConfigService } from '../wechat-intent-router-config.mjs';
import { createManagedWechatIntentRouter } from '../wechat-intent-router.mjs';
import { createWechatCursorExecutorAdminConfigService } from '../wechat-cursor-executor-admin-config.mjs';
@@ -33,6 +34,8 @@ export async function bootstrapPortalMemorySessionServices({
createAgentCodeRunAdminConfigService,
createWechatScheduleLlmConfigServiceFn =
createWechatScheduleLlmConfigService,
createWechatScheduledTaskManageLlmConfigServiceFn =
createWechatScheduledTaskManageLlmConfigService,
createWechatIntentRouterConfigServiceFn =
createWechatIntentRouterConfigService,
createWechatCursorExecutorAdminConfigServiceFn =
@@ -80,6 +83,8 @@ export async function bootstrapPortalMemorySessionServices({
createAgentCodeRunAdminConfigServiceFn(pool, { env });
const wechatScheduleLlmConfigService =
createWechatScheduleLlmConfigServiceFn(pool);
const wechatScheduledTaskManageLlmConfigService =
createWechatScheduledTaskManageLlmConfigServiceFn(pool);
const wechatIntentRouterConfigService =
createWechatIntentRouterConfigServiceFn(pool, { env });
const wechatCursorExecutorPolicyService =
@@ -160,6 +165,7 @@ export async function bootstrapPortalMemorySessionServices({
systemDisclosurePolicyService,
agentCodeRunPolicyService,
wechatScheduleLlmConfigService,
wechatScheduledTaskManageLlmConfigService,
wechatIntentRouterConfigService,
wechatCursorExecutorPolicyService,
wechatIntentRouter,