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
+17 -1
View File
@@ -1,7 +1,7 @@
import { useRef, useState } from 'react';
import { useUserAvatar } from '../hooks/useUserAvatar';
import type { Message } from '../types';
import { getDisplayText, getImageUrls, getRenderableImageUrls, getThinking, shouldShowChatMessage } from '../utils/message';
import { getDisplayText, getFileAttachments, getImageUrls, getRenderableImageUrls, getThinking, shouldShowChatMessage } from '../utils/message';
import { getMessageSaveActions } from '../utils/messageSave';
import { renderMarkdown } from '../utils/markdown';
import { filterText } from '../utils/wordFilter';
@@ -314,6 +314,7 @@ function MessageRow({
const thinking = getThinking(message);
const isUser = message.role === 'user';
const imageUrls = getImageUrls(message);
const fileAttachments = getFileAttachments(message);
const renderableImageUrls = getRenderableImageUrls(message);
const copyText = [thinking ? `【思考】\n${thinking}` : '', text].filter(Boolean).join('\n\n');
@@ -421,6 +422,21 @@ function MessageRow({
))}
</div>
)}
{fileAttachments.length > 0 && (
<div className="msg-file-attachments">
{fileAttachments.map((file, index) => (
<a
key={`${file.downloadUrl}-${index}`}
href={file.downloadUrl}
target="_blank"
rel="noreferrer"
className="msg-file-attachment-link"
>
{file.filename}
</a>
))}
</div>
)}
{text && (
<div
className="bubble-text"