fix: isolate WeChat runtime delivery path
This commit is contained in:
+7
-1
@@ -1430,6 +1430,7 @@ export function createTkmindProxy({
|
||||
sessionPolicy = null,
|
||||
recipe = null,
|
||||
disableImageReading = false,
|
||||
origin = 'h5',
|
||||
} = {},
|
||||
) {
|
||||
const resolvedWorkingDir = workingDir ?? await userAuth.resolveWorkingDir(userId);
|
||||
@@ -1458,7 +1459,12 @@ export function createTkmindProxy({
|
||||
throw new Error('创建会话失败:缺少 session id');
|
||||
}
|
||||
await rememberSessionTarget(session.id, startTarget);
|
||||
await sessionStore.registerAgentSession(userId, session.id, startTarget);
|
||||
await sessionStore.registerSession({
|
||||
userId,
|
||||
sessionId: session.id,
|
||||
target: startTarget,
|
||||
origin: origin === 'wechat' ? 'wechat' : 'h5',
|
||||
});
|
||||
const baseSessionScopedPolicy =
|
||||
typeof userAuth.getAgentSessionPolicy ===
|
||||
'function'
|
||||
|
||||
Reference in New Issue
Block a user