From a25ce068f991d746f8412332a3dcbc90636464ae Mon Sep 17 00:00:00 2001 From: thzxx Date: Thu, 18 Jun 2026 11:55:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=81=A2=E5=A4=8D=E8=81=8A=E5=A4=A9?= =?UTF-8?q?=E5=8C=BA=E7=B3=BB=E7=BB=9F=E6=B6=88=E6=81=AF=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=EF=BC=88=E5=BC=80=E5=A7=8B/=E5=AE=8C=E6=88=90/=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/components/input-area.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/renderer/components/input-area.ts b/src/renderer/components/input-area.ts index b48d093..91a955f 100644 --- a/src/renderer/components/input-area.ts +++ b/src/renderer/components/input-area.ts @@ -254,6 +254,7 @@ async function handleVideoPath(filePath: string): Promise { // 日志:开始 → 进度(原地更新) → 完成 logInfo('🎬 正在提取视频帧', name); + appendSystemMessage(`🎬 正在提取视频帧 (1fps): ${name}...`); pendingVideoMeta = { fileName: name, duration: 0, width: 0, height: 0 }; renderVideoPreview(); resetVideoProgress(name); @@ -274,6 +275,7 @@ async function handleVideoPath(filePath: string): Promise { pendingVideoFrames = []; pendingVideoMeta = null; renderVideoPreview(); + appendSystemMessage(`❌ 视频帧提取失败: ${result.error || ''}`); logError('视频帧提取失败', result.error || ''); return; } @@ -283,12 +285,14 @@ async function handleVideoPath(filePath: string): Promise { // 完成:新加一条 success 日志,进度条目保留原地 logSuccess('✅ 视频帧提取完成', `${pendingVideoFrames.length} 帧 / ${pendingVideoMeta.duration.toFixed(1)}s (1fps)`); + appendSystemMessage(`✅ ${name}: 已提取 ${pendingVideoFrames.length} 帧 (1fps 采样)`); renderVideoPreview(); } catch (err) { bridge.video.removeProgressListener(); pendingVideoFrames = []; pendingVideoMeta = null; renderVideoPreview(); + appendSystemMessage(`❌ 视频处理失败: ${(err as Error).message}`); logError('视频帧提取失败', (err as Error).message); } }