浏览代码

fix: 强制Python服务使用无头浏览器,避免同步评论时弹出有头浏览器

ethanfly 3 天之前
父节点
当前提交
fc666e004b
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      client/electron/local-services.ts

+ 2 - 0
client/electron/local-services.ts

@@ -362,6 +362,8 @@ function startPythonService(): void {
     PYTHONUNBUFFERED: '1',
     PYTHONIOENCODING: 'utf-8',
     PYTHONDONTWRITEBYTECODE: '1',
+    // 强制 Python Playwright 使用无头模式,避免弹出有头浏览器
+    HEADLESS: 'true',
   };
 
   const pwPath = getPlaywrightBrowsersPath();