dsh-oc-desktop 0.3.11 → 0.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/launcher/main.js +10 -2
  2. package/package.json +1 -1
package/launcher/main.js CHANGED
@@ -409,8 +409,16 @@ function createMainWindow(url) {
409
409
  win.on('resize', saveStateDebounced);
410
410
  win.on('move', saveStateDebounced);
411
411
  attachShellGuards(win);
412
- win.webContents.on('did-fail-load', (e, code, desc) => {
413
- if (code !== -3) showError(`页面加载失败 (${code} ${desc})`);
412
+ win.webContents.on('did-fail-load', (e, code, desc, url, isMainFrame) => {
413
+ // -3 (ERR_ABORTED) 是正常的中止(导航被替换/用户取消),不算失败
414
+ if (code === -3) return;
415
+ // 子框架(iframe)加载失败(如某个预览面板尝试连本地 5173)不应整页报错,
416
+ // 否则会把已正常加载的 harness 页面覆盖成错误页。仅记日志。
417
+ if (!isMainFrame) {
418
+ log('warn', `subframe load failed (${code} ${desc}) url=${url}`);
419
+ return;
420
+ }
421
+ showError(`页面加载失败 (${code} ${desc})`);
414
422
  });
415
423
  return win;
416
424
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-oc-desktop",
3
3
  "productName": "DeepSeek Harness Desktop",
4
- "version": "0.3.11",
4
+ "version": "0.3.12",
5
5
  "description": "DeepSeek Harness 桌面端插件(Electron 启动器):自绘标题栏/托盘/通知/快捷键/崩溃自愈",
6
6
  "main": "launcher/main.js",
7
7
  "bin": {