feat(mindspace): 0630004 空间 UI、聊天连接、微信分享与 Agent 能力
含 MindSpace 三列布局与统计修复、聊天加载态与连接降级、平台页脚标记与 og:site_name 微信卡片、勾选资料删除 Agent 接口及内部话术过滤。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+3
-9
@@ -181,14 +181,14 @@ export function createMindSpaceService(pool, options = {}) {
|
||||
c.ai_access_policy, c.publish_policy, c.is_system, c.sort_order,
|
||||
CASE
|
||||
WHEN c.category_code = 'draft' THEN COALESCE(pc.item_count, 0)
|
||||
WHEN c.category_code = 'public' THEN COALESCE(pub.item_count, 0)
|
||||
WHEN c.category_code IN ('oa', 'public') THEN COALESCE(pc.item_count, 0) + COALESCE(ac.item_count, 0)
|
||||
ELSE COALESCE(ac.item_count, 0)
|
||||
END AS item_count
|
||||
FROM h5_space_categories c
|
||||
LEFT JOIN (
|
||||
SELECT category_id, user_id, COUNT(*) AS item_count
|
||||
FROM h5_assets
|
||||
WHERE user_id = ? AND status <> 'deleted' AND source_type = 'upload'
|
||||
WHERE user_id = ? AND status <> 'deleted'
|
||||
GROUP BY category_id, user_id
|
||||
) ac ON ac.category_id = c.id AND ac.user_id = c.user_id
|
||||
LEFT JOIN (
|
||||
@@ -197,15 +197,9 @@ export function createMindSpaceService(pool, options = {}) {
|
||||
WHERE user_id = ? AND status <> 'deleted'
|
||||
GROUP BY category_id, user_id
|
||||
) pc ON pc.category_id = c.id AND pc.user_id = c.user_id
|
||||
LEFT JOIN (
|
||||
SELECT user_id, COUNT(DISTINCT page_id) AS item_count
|
||||
FROM h5_publish_records
|
||||
WHERE user_id = ? AND status = 'online'
|
||||
GROUP BY user_id
|
||||
) pub ON pub.user_id = c.user_id
|
||||
WHERE c.user_id = ? AND c.space_id = ?
|
||||
ORDER BY c.sort_order, c.category_name`,
|
||||
[userId, userId, userId, userId, row.id],
|
||||
[userId, userId, userId, row.id],
|
||||
);
|
||||
|
||||
const quotaBytes = asNumber(row.quota_bytes);
|
||||
|
||||
Reference in New Issue
Block a user