Skip Cursor Chat Bridge for WeChat MP and page.generate sessions.
Memind CI / Test, build, and release guards (push) Failing after 5m45s

WeChat Goose turns always include tools, which the bridge PoC rejects with HTTP 501; keep Kimi/DeepSeek on the session while Cursor handles page execution separately.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-31 10:16:03 +08:00
parent 3688d732c0
commit fa20f735a5
4 changed files with 65 additions and 6 deletions
+9 -5
View File
@@ -2179,9 +2179,13 @@ export function createWechatMpService({
throw notifyFailure ? markWechatUserNotified(error) : error;
};
const ensureSessionProvider = async (sessionId, userId = null) => {
const ensureSessionProvider = async (sessionId, userId = null, { intentKind = '' } = {}) => {
if (!applySessionLlmProvider || !sessionId) return;
const applied = await applySessionLlmProvider(sessionId, { userId });
const applied = await applySessionLlmProvider(sessionId, {
userId,
channel: 'wechat_mp',
intentKind,
});
if (applied && applied.ok === false) {
throw new Error(applied.message || '专属 Agent Provider 未配置');
}
@@ -2823,7 +2827,7 @@ export function createWechatMpService({
});
let sessionId = route.sessionId;
let carriedSessionContent = String(route.carriedSessionContent ?? '').trim();
await ensureSessionProvider(sessionId, user.userId);
await ensureSessionProvider(sessionId, user.userId, { intentKind: wechatIntent.kind });
if (wechatIntent.kind === 'session.reset') {
await sendCustomerServiceText(
inbound.fromUserName,
@@ -2850,7 +2854,7 @@ export function createWechatMpService({
if (pollutionRotation.carriedSessionContent) {
carriedSessionContent = pollutionRotation.carriedSessionContent;
}
await ensureSessionProvider(sessionId, user.userId);
await ensureSessionProvider(sessionId, user.userId, { intentKind: wechatIntent.kind });
await rememberWechatUserContext(sessionId, user, { forceBootstrap: true });
}
if (
@@ -3392,7 +3396,7 @@ export function createWechatMpService({
userContext: user,
});
sessionId = route.sessionId;
await ensureSessionProvider(sessionId, user.userId);
await ensureSessionProvider(sessionId, user.userId, { intentKind: wechatIntent.kind });
await rememberWechatUserContext(sessionId, user, { forceBootstrap: route.isNewSession });
if (historicalImageError) {
prepareWechatIntentForHistoricalImageRetry(intent, {