9router/src/app/api/cli-tools
Zireael 6c10edf8ba fix(cli-tools): tolerate JSONC configs in CLI tool settings routes
readConfig/readSettings/readJson across all CLI tool settings routes used
JSON.parse() but only caught ENOENT, re-throwing SyntaxError on any
corrupted or JSONC-formatted config file. The API would return 500, which
the UI misinterpreted as "tool not installed."

This patch:
- strips trailing commas before parsing (handles JSONC from opencode, etc.)
- returns null on any parse error instead of re-throwing, so the UI shows
  "installed but not configured" (accurate) instead of "not installed"
- applies the same fix to all 8 affected routes: opencode, openclaw, kilo,
  droid, cowork, copilot, claude, and cline

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-20 15:37:01 +07:00
..
all-statuses feat: v0.4.41 - cli-tools UI redesign + jcode integration 2026-05-14 10:46:11 +07:00
antigravity-mitm # v0.4.29 (2026-05-10) 2026-05-10 21:56:40 +07:00
claude-settings fix(cli-tools): tolerate JSONC configs in CLI tool settings routes 2026-06-20 15:37:01 +07:00
cline-settings fix(cli-tools): tolerate JSONC configs in CLI tool settings routes 2026-06-20 15:37:01 +07:00
codex-settings - Cap maximum cooldown for rate limit handling in account unavailability and single-model chat flows 2026-04-24 16:14:18 +07:00
copilot-settings fix(cli-tools): tolerate JSONC configs in CLI tool settings routes 2026-06-20 15:37:01 +07:00
cowork-mcp-registry feat: Added McpMarketplaceModal to the CoworkToolCard for improved plugin management. 2026-05-09 10:15:38 +07:00
cowork-mcp-tools feat: Added McpMarketplaceModal to the CoworkToolCard for improved plugin management. 2026-05-09 10:15:38 +07:00
cowork-settings fix(cli-tools): tolerate JSONC configs in CLI tool settings routes 2026-06-20 15:37:01 +07:00
deepseek-tui-settings feat: add DeepSeek TUI as CLI tool in dashboard (#1088) 2026-05-13 22:40:42 +07:00
droid-settings fix(cli-tools): tolerate JSONC configs in CLI tool settings routes 2026-06-20 15:37:01 +07:00
hermes-settings - Added Hermes tool to CLI tools and updated related components. 2026-04-23 16:39:31 +07:00
jcode-settings feat: v0.4.41 - cli-tools UI redesign + jcode integration 2026-05-14 10:46:11 +07:00
kilo-settings fix(cli-tools): tolerate JSONC configs in CLI tool settings routes 2026-06-20 15:37:01 +07:00
openclaw-settings fix(cli-tools): tolerate JSONC configs in CLI tool settings routes 2026-06-20 15:37:01 +07:00
opencode-settings fix(cli-tools): tolerate JSONC configs in CLI tool settings routes 2026-06-20 15:37:01 +07:00