项目主页 · English · Codex抖音窗口切换Windows版工具 · Codex窗口切换 · 使用场景 · 使用指南 · 问答 · 下载页 · 故障排查 · 支持 · 安全 · 贡献 · 传播素材 · 下载 Windows Release · llms.txt · CodeMeta · Citation
Codex Focus Windows 是一个面向 Windows 的 Codex抖音窗口切换Windows版工具 / Codex窗口切换 / Codex 抖音自动切换工具。当 Codex Desktop 开始执行任务时,它会自动切到抖音 Windows 客户端并继续播放;当 Codex 任务完成、失败、终止或需要权限确认时,它会暂停抖音并切回 Codex。
English summary: Codex Focus Windows is a Windows productivity utility for Codex Desktop and Douyin. It automatically switches to Douyin while Codex is working, then pauses Douyin and returns to Codex when Codex needs your attention.
适合这些搜索和使用场景:
- Codex抖音窗口切换Windows版工具、Codex 抖音窗口切换 Windows 版工具。
- Codex窗口切换、Codex 窗口切换、Codex 自动切换窗口。
- Codex 执行长任务时自动切到抖音。
- Codex 长任务等待时看抖音,任务完成后自动切回 Codex。
- Codex 等待权限确认时自动暂停抖音并切回 Codex。
- Windows 上的 Codex Desktop + 抖音客户端自动切换。
- Codex 自动播放/暂停抖音、Codex focus tool、Douyin auto switch for Codex Desktop。
这个项目参考了 GeniusMarker/CodexFocus 的产品思路,但 Windows 版是基于 .NET 8 和 WPF 重新实现的版本。
- 监听本机 Codex Desktop 的 session transcript。
- Codex 开始执行任务时自动切到抖音窗口并继续播放。
- Codex 完成任务、任务中断、失败或等待权限确认时暂停抖音并切回 Codex。
- 支持“切换延迟”设置,
0表示检测到任务后立即切换。 - 支持自定义 Codex 和抖音进程名。
- 支持启动后自动监听和开机自启。
- 提供窗口检测、手动测试切换和最近事件日志。
- 应用读取
%USERPROFILE%\.codex\sessions下的 Codex Desktop transcript。 - 检测到新的 Codex 任务开始后,激活抖音 Windows 客户端窗口。
- 应用向抖音窗口中心发送一次点击,用于继续播放或暂停。
- 检测到 Codex 完成、失败、中断或等待权限确认后,暂停抖音并切回 Codex。
窗口切换通过 Win32 API 完成,窗口匹配优先使用进程名,避免误切到浏览器、文档或聊天窗口。
- 安装 .NET 8 Desktop Runtime。
- 打开 Codex Desktop。
- 打开抖音 Windows 客户端。
- 启动 Codex Focus Windows。
- 确认界面里能检测到 Codex 窗口和抖音窗口。
- 保持“启动后自动监听”开启,或手动点击“开始监听”。
优先从独立下载页或 GitHub Releases 下载构建好的 Windows 程序:https://xhuiz.github.io/CodexFocus-Windows/download.html。没有可下载版本时,可以从源码构建。
需要 .NET 8 SDK:
dotnet build CodexFocus.sln -c ReleaseRelease 产物位置:
src\CodexFocus.Windows\bin\Release\net8.0-windows\CodexFocus.Windows.exe
用户配置保存在:
%APPDATA%\CodexFocusWindows\settings.json
常用配置项:
PollIntervalSeconds:轮询间隔,默认0.2秒,支持小数。TaskSwitchDelaySeconds:Codex 开始任务后多久切到抖音,0表示立即切换。ActivationDelayMilliseconds:激活抖音窗口后的点击等待时间,默认100毫秒。ReturnDelayMilliseconds:暂停抖音后切回 Codex 的等待时间,默认0毫秒。DouyinWindowKeywords:匹配抖音窗口的进程名,默认包含douyin。CodexWindowKeywords:匹配 Codex 窗口的进程名,默认包含Codex。
如果觉得切换太慢,把 TaskSwitchDelaySeconds 设为 0。如果短任务会来回切,把它调成 1 到 3。
dotnet run --project tests\CodexFocus.Tests\CodexFocus.Tests.csproj独立问答页整理了“有没有 Codex 自动切换抖音的软件”“Codex 等待权限确认时能不能自动切回”等自然语言搜索问题:https://xhuiz.github.io/CodexFocus-Windows/answers/codex-douyin-auto-switch.html
它是一个 Codex Desktop 和抖音 Windows 客户端之间的自动切换工具。Codex 工作时自动切到抖音,Codex 需要你处理时自动暂停抖音并切回 Codex。
当 Codex 执行较长任务时,你可以把注意力临时切到抖音;当 Codex 完成任务或等待权限确认时,工具会把你带回 Codex,减少手动切窗口和漏看确认弹窗的情况。
首版主要面向抖音 Windows 客户端,不保证浏览器版抖音可用。
不会。它只读取 Codex Desktop 的本地 transcript 来判断状态,并通过窗口激活和鼠标点击控制抖音播放/暂停。
Windows 版基于 .NET 8 和 WPF 实现,因此运行和构建都需要对应的 .NET 运行时或 SDK。
当前版本优先支持抖音 Windows 客户端。其他媒体软件需要额外适配窗口匹配和播放/暂停逻辑。
Codex抖音窗口切换Windows版工具、Codex 抖音窗口切换 Windows 版工具、Codex窗口切换、Codex 窗口切换、Codex 自动切换窗口、Codex 抖音自动切换、Codex 自动暂停抖音、Codex 自动播放抖音、CodexFocus Windows、Codex Desktop automation、Douyin auto switch、Windows focus tool、AI coding productivity tool。
- 故障排查:见 https://xhuiz.github.io/CodexFocus-Windows/troubleshooting.html。
- 支持与问题反馈:见 SUPPORT.md。
- 安全边界和漏洞反馈:见 SECURITY.md。
- 贡献指南和本地构建:见 CONTRIBUTING.md。
- 行为准则:见 CODE_OF_CONDUCT.md。
- 提交 issue 时不要粘贴私有 Codex prompt、transcript、凭据、token 或个人数据。
- 暂停/播放依赖窗口中心点击,如果抖音客户端界面布局变化,可能需要手动测试。
- 如果切回 Codex 时没有回到正确窗口,请检查 Codex 进程名设置是否与真实进程名一致。
- 本仓库当前未声明开源许可证;公开代码不等于自动授予再分发或商用许可。
详见 CONTRIBUTORS.md。