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:
@@ -30,6 +30,8 @@ export function resolveCursorChannelEligible({
|
||||
export function resolveCursorChatBridgeEligible({
|
||||
user = null,
|
||||
userId = null,
|
||||
channel = '',
|
||||
intentKind = '',
|
||||
policy = null,
|
||||
env = process.env,
|
||||
} = {}) {
|
||||
@@ -37,6 +39,13 @@ export function resolveCursorChatBridgeEligible({
|
||||
const subject = user ?? { userId };
|
||||
if (!isUserAllowedByWechatCursorPolicy(subject, policy)) return false;
|
||||
if (!isCursorFeatureEnabled(policy, CURSOR_CHANNEL_FEATURES.CHAT_BRIDGE)) return false;
|
||||
const normalizedChannel = String(channel ?? '').trim().toLowerCase();
|
||||
// WeChat Goose sessions always carry tools; the bridge PoC rejects tool calls.
|
||||
if (normalizedChannel === CURSOR_EXECUTOR_CHANNEL.WECHAT_MP) return false;
|
||||
if (String(intentKind ?? '').trim() === 'page.generate') return false;
|
||||
if (!isChannelAllowedByCursorPolicy(normalizedChannel || CURSOR_EXECUTOR_CHANNEL.H5, policy)) {
|
||||
return false;
|
||||
}
|
||||
const bridgeEnvEnabled = String(env?.MEMIND_CURSOR_CHAT_BRIDGE_ENABLED ?? '').trim();
|
||||
if (!['1', 'true', 'yes', 'on'].includes(bridgeEnvEnabled.toLowerCase())) return false;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user