feat(agent): 支持工具执行结果中的图片和视频资产预览

在聊天消息组件中添加资产灯箱预览功能,支持展示工具调用返回的图片和视频资源。新增 `AssetLightbox` 组件用于全屏浏览资产,并扩展消息类型以包含资产元数据。同时引入 `@radix-ui/react-select` 依赖并为服务端添加资产 URL 转换工具函数。
This commit is contained in:
2026-05-08 02:14:28 +08:00
parent e16305840b
commit 803b55605f
9 changed files with 894 additions and 14 deletions

View File

@@ -6,6 +6,7 @@ import { ChatMessage } from './ChatMessage';
import { ChatInput } from './ChatInput';
import { PipelineProgress } from './PipelineProgress';
import { Button } from '@/components/ui/button';
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '@/components/ui/select';
import { RefreshCw, Loader2, StopCircle, X, MessageCircle, ArrowDown } from 'lucide-react';
import { api } from '@/lib/api';
import type { Account, Message } from '@/types';