feat: add Windows platform support#26
Open
Zac-lzh wants to merge 1 commit into
Open
Conversation
- Add scripts/daemon.js: cross-platform daemon manager (macOS/Linux/Windows) - Update package.json: use node scripts/daemon.js instead of bash scripts/daemon.sh - Fix src/main.ts: add Windows path pattern (C:\..., D:\...) to file auto-push regex - Fix src/wechat/send.ts: use homedir() instead of process.env.HOME for tilde expansion - Fix src/tools/visualize-logs.ts: cross-platform file open (macOS/Windows/Linux) - Update README.md and SKILL.md: add Windows to supported platforms
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.
What
Add Windows platform support to wechat-claude-code. The core Node.js code already works on Windows, but the daemon management script and a few source files had Unix-specific assumptions.
Changes
New file:
scripts/daemon.jsCross-platform daemon manager that replaces the bash-only
daemon.sh. Supports macOS (launchd), Linux (systemd + nohup fallback), and Windows (PID file + tasklist/taskkill).package.jsonChanged daemon script from
bash scripts/daemon.shtonode scripts/daemon.jsfor cross-platform compatibility.src/main.ts— Windows path regexextractFilePathsFromText()now matches Windows paths in addition to Unix paths, so file auto-push works on Windows.src/wechat/send.ts— tilde expansion fixReplaced
process.env.HOME || ''withhomedir()fromnode:os. On Windows,process.env.HOMEis typically unset, causing tilde paths to resolve incorrectly.src/tools/visualize-logs.ts— cross-platform file openReplaced macOS-only
opencommand with platform-conditional logic (open / cmd start / xdg-open).README.md&SKILL.mdUpdated prerequisites to include Windows.
Testing
npm run buildcompiles without errorsnode scripts/daemon.js statusworks on Windowsnode scripts/daemon.js logsworks on Windowsnode dist/main.js setupQR code flow works on Windowsnode dist/main.js startdaemon runs on Windows