feat: v0.8.2 安全纵深补全 · 协议保真 · 断链修复 — 图片SSRF/根MEMORY.md保护根治 · Anthropic thinking回传+pause_turn续传 · 2523 用例全量回归 + E2E 扩充
This commit is contained in:
@@ -108,7 +108,13 @@ export class UpdateService {
|
||||
/** AutoUpdater 句柄(IPC 层消费;null = 未启用/dev 模式/未配置 feed) */
|
||||
export interface AutoUpdaterHandle {
|
||||
checkForUpdates: () => Promise<void>;
|
||||
/** 仅下载更新包(下载完成后广播 downloaded,不自动重启) */
|
||||
downloadAndInstall: () => Promise<void>;
|
||||
/**
|
||||
* v0.8.2 P1-3: 安装已下载的更新并重启应用。
|
||||
* 仅在收到 downloaded 状态后由用户显式确认调用。
|
||||
*/
|
||||
installNow: () => void;
|
||||
}
|
||||
|
||||
let activeHandle: AutoUpdaterHandle | null = null;
|
||||
@@ -173,6 +179,16 @@ export async function startAutoUpdater(
|
||||
try {
|
||||
await autoUpdater.downloadUpdate();
|
||||
onEvent({ status: 'downloaded' });
|
||||
// v0.8.2 P1-3 根治: 不再下载完成立即 quitAndInstall —— 渲染层刚收到
|
||||
// downloaded 事件应用就退出,用户可能丢失未保存内容(写了一半的输入、
|
||||
// 进行中的会话操作)。安装动作拆分为独立的 installNow,由用户在收到
|
||||
// "更新已下载"提示后显式确认触发。
|
||||
} catch (err) {
|
||||
onEvent({ status: 'error', message: (err as Error).message });
|
||||
}
|
||||
},
|
||||
installNow: () => {
|
||||
try {
|
||||
autoUpdater.quitAndInstall();
|
||||
} catch (err) {
|
||||
onEvent({ status: 'error', message: (err as Error).message });
|
||||
|
||||
Reference in New Issue
Block a user