feat(mindspace): 0630004 空间 UI、聊天连接、微信分享与 Agent 能力
含 MindSpace 三列布局与统计修复、聊天加载态与连接降级、平台页脚标记与 og:site_name 微信卡片、勾选资料删除 Agent 接口及内部话术过滤。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { buildMindSpacePageSaveInstructions } from './mindspace-page-patch.mjs';
|
||||
import { buildSelectedAssetDeleteInstructions } from './mindspace-asset-agent.mjs';
|
||||
|
||||
const VIEW_LABELS = {
|
||||
home: '空间首页',
|
||||
@@ -107,7 +108,7 @@ function buildSelectedAssetInstructions(context) {
|
||||
`- 用户在界面勾选了 1 份${kind}:「${asset.displayName}」(id: ${asset.id},${asset.mimeType})`,
|
||||
'- 用户说「这个 / 这份 / 这篇 / 这份报告 / 这个数据 / 帮我分析 / 帮我删除」等指代词时,**必须**指这份勾选资料,不得猜测其它文件。',
|
||||
`- 读取/下载:GET /api/mindspace/v1/assets/${asset.id}/download`,
|
||||
`- 删除:DELETE /api/mindspace/v1/assets/${asset.id}(执行删除前必须向用户确认)`,
|
||||
'- 删除:须先与用户确认,确认后由你直接执行删除(见下方「勾选资料删除」);你对该用户空间有完整读写删改权限,**禁止**推给用户自行去界面删除。',
|
||||
);
|
||||
if (context.h5ApiBase) {
|
||||
lines.push(`- H5 API 基址:${context.h5ApiBase}`);
|
||||
@@ -129,7 +130,7 @@ function buildSelectedAssetInstructions(context) {
|
||||
export function buildSelectedAssetGreeting(asset) {
|
||||
const kind = inferAssetKindLabel(asset);
|
||||
const name = asset.displayName ?? asset.filename ?? '这份资料';
|
||||
return `我看到你在界面里勾选了「${name}」。你是想查看或处理这份${kind}吗?可以直接说「帮我分析」「总结一下」或「帮我删除」——我会针对这份资料来操作。`;
|
||||
return `我看到你在界面里勾选了「${name}」。你是想查看或处理这份${kind}吗?可以直接说「帮我分析」「总结一下」或「帮我删除」——确认后我可以直接在这份${kind}上操作(含删除)。`;
|
||||
}
|
||||
|
||||
export function buildMindSpaceChatContext(input) {
|
||||
@@ -362,6 +363,7 @@ export function buildContextPrefix(context) {
|
||||
}
|
||||
|
||||
lines.push(...buildSelectedAssetInstructions(context));
|
||||
lines.push(...buildSelectedAssetDeleteInstructions(context));
|
||||
|
||||
if (context.homeCategories?.length) {
|
||||
lines.push('- 空间分类概览:');
|
||||
|
||||
Reference in New Issue
Block a user