refactor: 视频/图片/文件组合发送,各走各的渲染通道

- ChatMessage 新增 _videoFrames/_videoMeta 独立字段
- msg.images 只放图片,视频帧走 _videoFrames
- 聊天卡片:图片缩略图 + 视频指示牌 + 文件 chips 可同时显示
- Ollama API 仍合并全部帧到 images 数组
This commit is contained in:
thzxx
2026-06-18 12:45:06 +08:00
parent 5251319efb
commit fed1e6d1c2
3 changed files with 44 additions and 43 deletions
+3
View File
@@ -111,6 +111,9 @@ export interface ChatMessage {
images?: string[];
files?: ChatFile[];
_fileContents?: FileContent[];
/** 视频帧数据(用于消息卡片渲染,不走 images 缩略图) */
_videoFrames?: Array<{ name: string; base64: string; timestampSeconds: number }>;
_videoMeta?: { fileName: string; duration: number; frameCount: number };
stopped?: boolean;
toolCalls?: ToolCallRecord[];
/** 标记此消息为 LLM 压缩摘要生成 */