Skip to content

cc-devtool v0.1.4

Choose a tag to compare

@github-actions github-actions released this 20 Apr 16:26
· 7 commits to main since this release

cc-devtool v0.1.4

Session list performance + Proxy UX: cc-switch toggle, upstream presets, Save & Restart

中文版 →


Overview

A focused release that eliminates the two biggest pain points users hit after v0.1.3:

  1. The session list getting slow — or temporarily showing "No sessions" — when the local agent session count is large.
  2. Switching proxy upstreams (especially cc-switch ↔ direct) being a multi-step manual chore.

Release Date: 2026-04-20


Highlights

  • Much faster session list when you have many Cursor sessions
  • Never silently empty again — transient API failures now show an inline error with Retry, keeping your last loaded list visible
  • cc-switch toggle — one click to route upstream through cc-switch; click again to revert to your previous upstream
  • Upstream presets — save any upstream combo as a named preset, switch between them instantly
  • Save & Restart — when the proxy is running, apply config changes and hot-restart in one click

What's Changed

Performance — Session List

  • Batched Cursor enrichment: Previously every Cursor session triggered one SQLite query against ai-code-tracking.db. Now a single IN (...) query covers up to 400 sessions per round-trip.
  • Concurrent scan dedupe: If multiple GET /api/sessions requests arrive while a scan is in progress (e.g. initial load + a WebSocket session_update), they all share one in-flight scan instead of triggering parallel full filesystem walks.
  • Per-tool fault isolation: listAllSessions now uses Promise.allSettled. If one adapter fails (e.g. a corrupt Cursor DB), the other tools still return their sessions — instead of the whole endpoint failing.

Fixed — Empty State

  • Stale request cancellation: The client now aborts any previous /sessions request before issuing a new one, so a slow first request can't overwrite a fast second response.
  • Inline error + Retry: Fetch failures no longer silently clear the session list. An amber banner shows the error with a Retry button; the previously loaded list remains visible.
  • Refresh is non-blocking: When you already have a list and a refresh is in progress, only a subtle "Refreshing…" hint appears at the top — the list itself is not replaced with a full-page spinner.

Added — Proxy Configuration

cc-switch Bidirectional Toggle

When cc-switch is detected, the Configuration card shows a toggle:

  • ON: upstreams routed through http://<cc-switch-host>:<port>
  • OFF: restored to the last non-cc-switch upstream you used (falls back to Direct if none is recorded)

Flipping between modes is one click; no more manually editing two URL fields.

Upstream Presets

New Presets section with:

  • Built-in Direct — api.anthropic.com / api.openai.com
  • Built-in cc-switch — appears automatically when cc-switch is detected
  • User presets — save any upstream combo under a name (stored in browser localStorage). Hover to delete.

The preset matching your current upstream is highlighted; when no preset matches, a + Save current shortcut appears.

Save & Restart

When the proxy is running and you have unsaved changes, two buttons appear:

  • Save — persists config only (previous behavior)
  • Save & Restart — saves config and hot-restarts the proxy immediately, so upstream changes take effect without manual stop/start

Backed by a new POST /api/proxy/restart endpoint that performs an atomic stop + start.


Upgrading

npm install -g cc-devtool
# or update desktop app via auto-updater

All changes are additive; existing config in ~/.cc-devtool/config.json is preserved. Upstream presets are stored per-browser in localStorage (key cc-devtool:proxy-presets).


Full Commit List

  • perf: speed up session list; fix empty state on fetch failure (f91609e)
  • feat(proxy): cc-switch toggle, upstream presets, save & restart (743a8f8)