fix(wechat): apply agent timeout and Page Data review to all users
Memind CI / Test, build, and release guards (push) Failing after 10m39s
Memind CI / Test, build, and release guards (push) Failing after 10m39s
Remove per-user gray gates so WeChat MP always honors agentReplyTimeoutMs and enables Page Data Aider review when the feature flag is on. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-6
@@ -2584,10 +2584,7 @@ export function createWechatMpService({
|
|||||||
artifacts,
|
artifacts,
|
||||||
forcePageData,
|
forcePageData,
|
||||||
}) => {
|
}) => {
|
||||||
const enabledForUser =
|
if (!config.pageDataAiderReviewEnabled) return { action: 'skip', reason: 'disabled' };
|
||||||
config.pageDataAiderReviewEnabled &&
|
|
||||||
isWechatMediaGrayUser(user, config.pageDataAiderReviewUsers);
|
|
||||||
if (!enabledForUser) return { action: 'skip', reason: 'disabled' };
|
|
||||||
if (typeof pageDataDeliveryReviewer?.reviewIfNeeded !== 'function') {
|
if (typeof pageDataDeliveryReviewer?.reviewIfNeeded !== 'function') {
|
||||||
const error = new Error('微信 Page Data 强制 Aider 审核服务不可用');
|
const error = new Error('微信 Page Data 强制 Aider 审核服务不可用');
|
||||||
error.code = 'PAGE_DATA_REVIEW_UNAVAILABLE';
|
error.code = 'PAGE_DATA_REVIEW_UNAVAILABLE';
|
||||||
@@ -2617,8 +2614,7 @@ export function createWechatMpService({
|
|||||||
const runIntentMessage = async ({ inbound, intent, user }) => {
|
const runIntentMessage = async ({ inbound, intent, user }) => {
|
||||||
const wechatIntent = await resolveWechatIntent(intent, { openid: inbound.fromUserName });
|
const wechatIntent = await resolveWechatIntent(intent, { openid: inbound.fromUserName });
|
||||||
const mediaAnalysisEnabled = isWechatMediaGrayUser(user, config.mediaAnalysisGrayUsers);
|
const mediaAnalysisEnabled = isWechatMediaGrayUser(user, config.mediaAnalysisGrayUsers);
|
||||||
const reliabilityEnabled = isWechatMediaGrayUser(user, config.reliabilityGrayUsers);
|
const agentReplyTimeoutMs = config.agentReplyTimeoutMs;
|
||||||
const agentReplyTimeoutMs = reliabilityEnabled ? config.agentReplyTimeoutMs : 0;
|
|
||||||
const resetCandidate =
|
const resetCandidate =
|
||||||
intent.msgType === 'text' || intent.msgType === 'voice' ? intent.agentText : '';
|
intent.msgType === 'text' || intent.msgType === 'voice' ? intent.agentText : '';
|
||||||
const isPageDataRequest = isWechatPageDataTask(resetCandidate);
|
const isPageDataRequest = isWechatPageDataTask(resetCandidate);
|
||||||
|
|||||||
Reference in New Issue
Block a user