feat: chat uploads, vision turn isolation, and MindSpace agent improvements

Add chat file/image upload UX, attachment proxying, vision thumbnails, and per-turn image scoping so agents only use the current upload. Extend MindSpace asset context, billing token state, OA/scenario verify scripts, and related runtime config.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-11 00:23:01 +08:00
parent e3063ea806
commit 32fb2cdeaf
51 changed files with 4588 additions and 186 deletions
+22
View File
@@ -26,6 +26,28 @@ test('buildSelectedAssetReadInstructions uses agent download proxy', () => {
assert.match(text, /禁止.*assets\/:id\/download/);
assert.match(text, /asset-9/);
assert.match(text, /session-1/);
assert.match(text, /数据表汇总校验/);
assert.match(text, /SUM/);
});
test('buildSelectedAssetReadInstructions skips download probe when workspace path exists', () => {
const lines = buildSelectedAssetReadInstructions({
selectedAssets: [
{
id: 'asset-9',
displayName: 'sales.xlsx',
mimeType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
workspaceRelativePath: 'oa/sales.xlsx',
},
],
h5ApiBase: 'http://127.0.0.1:8081',
agentSessionId: 'session-1',
});
const text = lines.join('\n');
assert.match(text, /已落盘路径/);
assert.match(text, /read_file oa\/sales\.xlsx/);
assert.match(text, /禁止.*list_dir/);
assert.match(text, /禁止.*重复调用 mindspace_asset_download/);
});
test('buildSelectedAssetDeleteInstructions includes agent delete curl', () => {