fix: isolate WeChat runtime delivery path

This commit is contained in:
john
2026-07-28 09:33:25 +08:00
parent 5a13950bc3
commit 7f9453433c
8 changed files with 226 additions and 9 deletions
@@ -20,6 +20,7 @@ import {
export async function bootstrapPortalIntegrationServices({
pool,
h5Root,
codeRoot = h5Root,
env = process.env,
usersRoot,
wechatMpConfig,
@@ -76,7 +77,9 @@ export async function bootstrapPortalIntegrationServices({
);
}
const wechatMp = await loadWechatMpModuleFn(h5Root);
const wechatMpRoot = codeRoot || h5Root;
logger.log?.(`[WeChat MP] Loading runtime module from code root: ${wechatMpRoot}`);
const wechatMp = await loadWechatMpModuleFn(wechatMpRoot);
const pageDataDeliveryReviewer =
wechatMpConfig?.pageDataAiderReviewEnabled === true
? createPageDataDeliveryCodeReviewServiceFn({
@@ -122,6 +125,7 @@ export async function bootstrapPortalIntegrationServices({
tkmindProxy.startSessionForUser(userId, {
workingDir,
sessionPolicy,
origin: 'wechat',
}),
sessionApiFetch: async (
sessionId,