Skip to content

fix: 改进 Windows Discord 启动与 CDP 校验 - #2270

Open
bingame wants to merge 1 commit into
jackwener:mainfrom
bingame:codex/windows-discord-cdp
Open

fix: 改进 Windows Discord 启动与 CDP 校验#2270
bingame wants to merge 1 commit into
jackwener:mainfrom
bingame:codex/windows-discord-cdp

Conversation

@bingame

@bingame bingame commented Aug 9, 2026

Copy link
Copy Markdown

说明

本 PR 改进 Windows 上 Discord 桌面适配器的应用发现、启动与 CDP 连接流程:

  • 自动发现 %LOCALAPPDATA% 下 Discord 的最新安装版本。
  • Discord 已运行但未启用 CDP 时,交互式请求确认后再重启;非交互环境默认拒绝。
  • 仅结束与已确认安装目录匹配的 Discord 进程。
  • 校验 CDP /json 目标确实属于 Discord,避免连接到占用同一端口的其他 Electron 应用。
  • 精确探测自定义 HTTP(S) CDP 端点,同时保留直接 WebSocket 端点兼容性。
  • 补充 Windows、身份校验、确认流程和异常路径测试,并更新 Discord 桌面适配器文档。

Related issue: 无

变更类型

  • 🐛 Bug fix
  • ✨ New feature
  • 🌐 New site adapter
  • 📝 Documentation
  • ♻️ Refactor
  • 🔧 CI / build / tooling

检查清单

  • 已运行本 PR 相关检查
  • 已补充测试和文档
  • 已提供验证输出

文档

  • 已更新 docs/adapters/desktop/discord.md
  • 本次未改变命令发现入口,无需更新 README 或侧边栏

验证输出

  • npm run typecheck:通过
  • npx vitest run --project unit src/launcher.test.ts src/electron-apps.test.ts src/engine.test.ts --reporter=dot:59 项通过,10 项平台跳过

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant