feat(mindspace): 0630004 空间 UI、聊天连接、微信分享与 Agent 能力
含 MindSpace 三列布局与统计修复、聊天加载态与连接降级、平台页脚标记与 og:site_name 微信卡片、勾选资料删除 Agent 接口及内部话术过滤。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import { normalizeWorkspaceRelativePath } from './mindspace-pages.mjs';
|
||||
|
||||
const PUBLIC_HTML_SKIP_DIRS = new Set([
|
||||
'.tmp-images',
|
||||
@@ -10,14 +11,7 @@ const PUBLIC_HTML_SKIP_DIRS = new Set([
|
||||
]);
|
||||
|
||||
function normalizePublicHtmlPath(relativePath) {
|
||||
const parts = String(relativePath ?? '')
|
||||
.replace(/^\/+/, '')
|
||||
.split('/')
|
||||
.filter((part) => part && part !== '.' && part !== '..');
|
||||
if (parts.length === 0) return '';
|
||||
if (parts[0].toLowerCase() === 'public') return parts.join('/');
|
||||
if (parts.length === 1 && parts[0].toLowerCase().endsWith('.html')) return `public/${parts[0]}`;
|
||||
return parts.join('/');
|
||||
return normalizeWorkspaceRelativePath(relativePath);
|
||||
}
|
||||
|
||||
function titleFromRelativePath(relativePath) {
|
||||
|
||||
Reference in New Issue
Block a user