[codex] Fix WeChat automation on Windows - #1
Draft
ChutianWong wants to merge 3 commits into
Draft
Conversation
The WeChat chatops monitor and worker hard-coded the Codex CLI. Add a pluggable backend so they can use Claude Code (claude -p) instead, selected per-chat via the 'agent_backend' JSON key or via WECHAT_AGENT_BACKEND for the worker pane. Codex remains the default, so existing setups are unaffected. - New agent_backend.py: select_backend() + run_agent() dispatching to codex or claude. The read-only monitor path hard-blocks mutating/exec tools and never prompts, so it stays safe head-less; the worker path is writable. - wechat_ops.py: doctor checks the selected backend CLI; init-config gains --agent-backend and writes a claude block. Also make the virtual desktop usable from a Windows/WSL2 checkout: - .gitattributes forces *.sh to LF (a Windows checkout otherwise yields CRLF that breaks bash with 'set: pipefail: invalid option name'). - launch_virtual_desktop.sh / wechat_virtual_desktop.sh run x11vnc and WeChat with WAYLAND_DISPLAY unset (+ QT_QPA_PLATFORM=xcb) so they attach to the Xvfb display instead of escaping to the host WSLg Wayland session. - docs/WSL_WINDOWS_DEPLOY.md: end-to-end runbook (no secrets). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing