Skip Cursor Chat Bridge for WeChat MP and page.generate sessions.
Memind CI / Test, build, and release guards (push) Failing after 5m45s
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:
+9
-5
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user