feat: sync portal runtime fixes for release

This commit is contained in:
john
2026-06-27 22:28:41 +08:00
parent 8264e71f9e
commit 4a9bc710f1
14 changed files with 795 additions and 130 deletions
+1 -2
View File
@@ -2508,8 +2508,6 @@ api.post('/mindspace/v1/pages/analyze-chat-save', async (req, res) => {
thumbnailReady = false;
}
}
const sessionId = String(req.body?.session_id ?? req.body?.sessionId ?? '').trim();
const messageId = String(req.body?.message_id ?? req.body?.messageId ?? '').trim();
const existingPage = await mindSpacePages.findPageBySourceMessage(
req.currentUser.id,
sessionId,
@@ -2546,6 +2544,7 @@ api.post('/mindspace/v1/pages/quick-share-from-chat', async (req, res) => {
if (!mindSpacePages) return res.status(503).json({ message: 'MindSpace 未启用' });
try {
const bundle = await resolveChatSaveBundle(req.currentUser, __dirname, req.body);
console.log('[quick-share] bundle resolved, hasHtml:', Boolean(bundle.resolvedHtml));
if (!bundle.resolvedHtml) {
throw Object.assign(new Error('无法读取链接页面内容'), { code: 'static_page_not_found' });
}