fix: 视频指示牌显示文件名,多视频显示'2个视频'

This commit is contained in:
thzxx
2026-06-18 13:29:06 +08:00
parent 0aa33d590c
commit 0b2d8414a6
2 changed files with 8 additions and 2 deletions
+5 -1
View File
@@ -1032,7 +1032,11 @@ async function sendMessageWithAgentLoop(text: string, currentSession: ChatSessio
if (allVids.length > 0) {
const totalFrames = allVids.flatMap(v => v.frames);
msg._videoFrames = totalFrames;
msg._videoMeta = { fileName: allVids[0].name, duration: allVids[0].dur, frameCount: totalFrames.length };
msg._videoMeta = {
fileName: allVids.length === 1 ? allVids[0].name : `${allVids.length}个视频`,
duration: allVids[0].dur,
frameCount: totalFrames.length
};
}
if (userFiles.length > 0) {
msg.files = userFiles;