feat(mindspace): 0630004 空间 UI、聊天连接、微信分享与 Agent 能力
含 MindSpace 三列布局与统计修复、聊天加载态与连接降级、平台页脚标记与 og:site_name 微信卡片、勾选资料删除 Agent 接口及内部话术过滤。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -214,15 +214,39 @@ test('buildContextPrefix binds deictic references to a single checked asset', ()
|
||||
selectedAssets: [asset],
|
||||
route: '/space?category=oa',
|
||||
h5ApiBase: 'http://127.0.0.1:8081',
|
||||
agentSessionId: 'session-1',
|
||||
}),
|
||||
);
|
||||
|
||||
assert.match(prefix, /【界面勾选资料(硬性)】/);
|
||||
assert.match(prefix, /sales\.xlsx(id: asset-9/);
|
||||
assert.match(prefix, /DELETE \/api\/mindspace\/v1\/assets\/asset-9/);
|
||||
assert.match(prefix, /【勾选资料删除(硬性)】/);
|
||||
assert.match(prefix, /mindspace_asset_delete/);
|
||||
assert.match(prefix, /完整读写删改权限/);
|
||||
assert.match(prefix, /指代「这个文件」「这份报告」「这个数据」时\*\*必须\*\*指该勾选资料/);
|
||||
});
|
||||
|
||||
test('buildContextPrefix includes delete fallback when agent session id is missing', () => {
|
||||
const asset = {
|
||||
id: 'asset-9',
|
||||
displayName: 'sales.xlsx',
|
||||
mimeType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
};
|
||||
const prefix = buildContextPrefix(
|
||||
buildMindSpaceChatContext({
|
||||
space: sampleSpace,
|
||||
selectedCategory: sampleCategory,
|
||||
selectedPageId: null,
|
||||
pages: [],
|
||||
assets: [asset],
|
||||
selectedAssets: [asset],
|
||||
route: '/space?category=oa',
|
||||
h5ApiBase: 'http://127.0.0.1:8081',
|
||||
}),
|
||||
);
|
||||
assert.match(prefix, /CURRENT_AGENT_SESSION/);
|
||||
});
|
||||
|
||||
test('buildContextPrefix requires clarification when multiple assets are checked', () => {
|
||||
const assets = [
|
||||
{ id: 'asset-a', displayName: 'a.pdf', mimeType: 'application/pdf' },
|
||||
|
||||
Reference in New Issue
Block a user