6 Commits

Author SHA1 Message Date
shengwei.psw
66cc8f7696 fix: improve error handling and add config backup
Address additional review feedback:
- Guard default plugin path resolution with friendly error message
  suggesting explicit path when cli-anything-plugin dir not found
- Create backup of existing ~/.qoder.json before modification
  to allow easy revert if update is undesired

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:52:50 +08:00
shengwei.psw
b8bd7cf8db fix: add JSON validation and improve temp file handling
Address Copilot review feedback:
- Add explicit JSON validation with jq empty before modifying config
- Create temp file in same directory as config for atomic mv
- Add trap cleanup function to remove temp files on error

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:49:46 +08:00
panxiaojun233
74668461d7 Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-12 19:46:32 +08:00
shengwei.psw
0bacc98351 fix: improve jq dependency handling and JSON escaping in setup-qodercli.sh
- Move jq check from global scope to only where needed, allowing
  config creation to work without jq installed
- Add json_escape_path() helper for safe JSON string escaping
- Fix unsafe string interpolation in jq filter (use --arg instead)
- Use jq -n --arg for safe JSON generation when jq is available
- Properly escape paths with special characters (quotes, backslashes)
  in fallback heredoc when jq is unavailable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:34:08 +08:00
panxiaojun233
88418c40a3 Update qoder-plugin/setup-qodercli.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-12 19:21:52 +08:00
shengwei.psw
52dc2fb7de refactor: move Qodercli setup script to dedicated qoder-plugin/ directory
Per code review feedback: cli-anything-plugin/ should only contain
Claude Code related files. Created new top-level qoder-plugin/
directory following the same organization pattern as opencode-commands/.

Changes:
- Create qoder-plugin/ directory with setup-qodercli.sh
- Update script's PLUGIN_DIR to resolve to ../cli-anything-plugin
- Add Qodercli platform section to README.md and README_CN.md
- Update .gitignore to track qoder-plugin/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 18:57:45 +08:00