feat: 视频分析抽帧功能及 UI 优化
- 新增 extractVideoFrames 前端视频抽帧,支持按时长自动调整采样率 - 视频帧以 detail:low 图像序列发送,兼容 GPT-5.5 等模型 - 对话记录仅显示首帧缩略图,隐藏抽帧细节保持界面简洁 - 视频预览增加时长标签显示 - 修复视频预览缩略图未等比显示的问题 - 调整模型列表顺序,移除冗余标注 - 移除后端 ChatProxy 调试打印 - 重启按钮绕过 beforeunload 弹窗 Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
+11
-2
@@ -56,14 +56,23 @@ app.registerExtension({
|
||||
const maxAttempts = 40;
|
||||
const interval = setInterval(async () => {
|
||||
attempts++;
|
||||
if (attempts > maxAttempts) { clearInterval(interval); location.reload(); return; }
|
||||
if (attempts > maxAttempts) { clearInterval(interval); forceReload(); return; }
|
||||
try {
|
||||
const r = await fetch("/api/system_stats", { signal: AbortSignal.timeout(2000) });
|
||||
if (r.ok) { clearInterval(interval); location.reload(); }
|
||||
if (r.ok) { clearInterval(interval); forceReload(); }
|
||||
} catch {}
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
function forceReload() {
|
||||
window.onbeforeunload = null;
|
||||
Object.defineProperty(BeforeUnloadEvent.prototype, "returnValue", {
|
||||
get() { return ""; },
|
||||
set() {}
|
||||
});
|
||||
location.reload();
|
||||
}
|
||||
|
||||
const observer = new MutationObserver(inject);
|
||||
observer.observe(document.body, { childList: true, subtree: true });
|
||||
setTimeout(inject, 2000);
|
||||
|
||||
Reference in New Issue
Block a user