From 6266d0b10c6d0be0cc1a8b08de5f1750676a505b Mon Sep 17 00:00:00 2001 From: thzxx Date: Thu, 18 Jun 2026 14:50:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E6=8E=89=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=8C=87=E4=BB=A4=E6=80=A7=E6=96=87=E5=AD=97=EF=BC=8C=E5=8F=AA?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E4=BA=8B=E5=AE=9E=E4=B8=8D=E6=9B=BF=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=B8=8B=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/components/input-area.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/renderer/components/input-area.ts b/src/renderer/components/input-area.ts index 36c513b..1a7210e 100644 --- a/src/renderer/components/input-area.ts +++ b/src/renderer/components/input-area.ts @@ -1013,12 +1013,10 @@ async function sendMessageWithAgentLoop(text: string, currentSession: ChatSessio apiParts.push(...fileParts); logInfo('📄 文件内容已注入', `${fileParts.length} 段, 共 ${fileContents.reduce((s, f) => s + f.content.length, 0)} 字符`); } - // 图片和视频帧按顺序分块描述(images 数组:图片在前,视频帧在后) if (pendingImages.length === 1) { - apiParts.push(`[独立图片: ${pendingImages[0].name}](请单独分析该图片,勿与视频帧混淆)`); + apiParts.push(`[图片: ${pendingImages[0].name}]`); } else if (pendingImages.length > 1) { - const imgNames = pendingImages.map(img => img.name).join(', '); - apiParts.push(`[${pendingImages.length} 张独立图片: ${imgNames}](请分别分析每张图片,勿与视频帧混淆)`); + apiParts.push(`[${pendingImages.length} 张图片: ${pendingImages.map(img => img.name).join(', ')}]`); } let allVids: Array<{ name: string; count: number; dur: number; frames: Array<{ timestampSeconds: number; name: string }> }> = []; if (hasVideos) { @@ -1034,10 +1032,7 @@ async function sendMessageWithAgentLoop(text: string, currentSession: ChatSessio parts.push(`[视频帧序列 · ${v.name} · ${v.count}帧 · 1fps · ${v.dur.toFixed(0)}s]\n${fl}`); } apiParts.push(parts.join('\n\n')); - apiParts.push('以上为视频帧序列,按时间顺序排列,帧间存在时序关系。请分析视频内容。'); - } - if (pendingImages.length > 0 && hasVideos) { - apiParts.push('注意:独立图片和视频帧是不同的内容,请分别分析,不要混淆。'); + apiParts.push('以上为视频帧序列,按时间顺序排列。'); } apiContentForModel = apiParts.join('\n\n');