Commit Graph
1792 Commits
Author SHA1 Message Date
kaitranntt 7653caba71 feat(copilot): add complete model catalog with plan tiers
Add 19 GitHub Copilot supported models with metadata:
- Anthropic: claude-sonnet-4.5, claude-sonnet-4, claude-opus-4.5,
  claude-opus-4.1, claude-haiku-4.5
- OpenAI: gpt-5.2, gpt-5.1-codex-max, gpt-5.1-codex, gpt-5.1-codex-mini,
  gpt-5.1, gpt-5-codex, gpt-5, gpt-5-mini, gpt-4.1
- Google: gemini-3-pro, gemini-3-flash, gemini-2.5-pro
- xAI: grok-code-fast-1
- Fine-tuned: raptor-mini

Each model includes:
- minPlan: free, pro, pro+, business, enterprise
- multiplier: 0 = free tier, 0.25-0.33 = cheap, 1 = standard, 3-10 = premium
- preview: boolean for non-GA models

Update default model to claude-sonnet-4.5 (standard multiplier).
2025-12-18 03:48:47 -05:00
github-actions[bot] a87ef973fc chore(release): 6.3.1-dev.1 [skip ci] 2025-12-18 08:26:14 +00:00
kaitranntt 98c21efb5a fix(websearch): detect Gemini CLI auth status before showing Ready
Previously, WebSearch status showed "Ready (Gemini)" when the CLI binary
was installed, misleading users who hadn't authenticated yet.

Changes:
- Add isGeminiAuthenticated() to check ~/.gemini/oauth_creds.json
- Add 'needs_auth' state to WebSearchReadiness type
- Show warning "[!] Gemini: run 'gemini' to login" when not authenticated
- Fix incorrect 'gemini auth login' references (no such command exists)
- Update docs with correct npm install and authentication instructions
2025-12-18 03:24:59 -05:00
kaitranntt 5f0fde9a61 feat(ui): expose auth result with device code in hook
- add CopilotAuthResult interface with deviceCode field

- expose startAuthAsync and authResult from useCopilot hook

- immediately refetch status on auth success
2025-12-18 03:01:12 -05:00
kaitranntt 4783632958 fix(copilot): use token file check for instant auth status
- add hasTokenFile() for fast auth check without subprocess

- capture device code from copilot-api auth output

- export AuthFlowResult type with deviceCode and verificationUrl

- echo auth output to terminal while capturing for UI
2025-12-18 03:00:43 -05:00
semantic-release-bot f3a6f4ef4e chore(release): 6.3.1 [skip ci]
## [6.3.1](https://github.com/kaitranntt/ccs/compare/v6.3.0...v6.3.1) (2025-12-18)

### Bug Fixes

* **ui:** limit Connection Timeline to 100 events to prevent lag ([170dcdc](https://github.com/kaitranntt/ccs/commit/170dcdc44f825bb64bedd7eb53fff6127ca94bce))
2025-12-18 07:56:16 +00:00
Kai (Tam Nhu) TranandGitHub 576d282356 Merge pull request #134 from kaitranntt/dev
fix(ui): limit Connection Timeline events to prevent lag
2025-12-18 02:55:18 -05:00
kaitranntt 6b9396fbc6 feat(cliproxy): set WRITABLE_PATH for log storage in ~/.ccs/cliproxy/
- Add getCliproxyWritablePath() helper function
- Set WRITABLE_PATH env var when spawning CLIProxy in both executors
- Logs will now be stored in ~/.ccs/cliproxy/logs/ instead of CWD
- Enables error log viewer to find logs in predictable location

Note: CLIProxyAPI still has hardcoded MaxBackups=0 (unlimited).
Log rotation should be addressed in CLIProxyAPI upstream.
2025-12-18 02:54:46 -05:00
kaitranntt 1ef625ee86 fix(error-logs-monitor): properly handle status loading state
- Add isStatusLoading check to prevent false-negative rendering
- Use nullish coalescing for enabled param to ensure boolean value
- Component now waits for status before deciding visibility

Fixes initial render returning null due to undefined status
2025-12-18 02:45:58 -05:00
kaitranntt 3865747154 fix(ui): add install button to copilot page sidebar
- show Install copilot-api button when not installed

- display version in status when installed
2025-12-18 02:38:58 -05:00
kaitranntt ddf7b704a5 Merge remote-tracking branch 'origin/dev' into kai/feat/error-log-viewer 2025-12-18 02:33:06 -05:00
github-actions[bot] b98c428a89 chore(release): 6.3.0-dev.1 [skip ci] 2025-12-18 07:32:22 +00:00
kaitranntt 170dcdc44f fix(ui): limit Connection Timeline to 100 events to prevent lag
- add MAX_TIMELINE_EVENTS constant (100)

- slice events in useMemo to cap DOM elements

- prevents UI freeze with high request counts
2025-12-18 02:30:47 -05:00
kaitranntt f813ad06f6 feat(ui): add copilot-api install button and version display
- add CopilotInfo type and install mutation to useCopilot hook

- show version in status card when installed

- add Install button with loading state when not installed
2025-12-18 02:27:35 -05:00
kaitranntt fee241d00b feat(api): add copilot install and info endpoints
- POST /api/copilot/install: install copilot-api (optional version)

- GET /api/copilot/info: get install status, version, path

- GET /api/copilot/status: include version in response
2025-12-18 02:27:11 -05:00
kaitranntt 9a8eea82c5 refactor(copilot): use local installation from package manager
- copilot-auth: use getCopilotApiBinPath() instead of npx

- copilot-daemon: move PID file to ~/.ccs/copilot/daemon.pid

- copilot-executor: auto-install copilot-api on first use

- index: export package manager functions
2025-12-18 02:26:46 -05:00
kaitranntt ecdad1d6d0 feat(copilot): add self-managed package manager for copilot-api
- install copilot-api locally to ~/.ccs/copilot/

- auto-update with version caching (1hr TTL)

- version pinning support via .version-pin file

- mirrors CLIProxy binary-manager pattern
2025-12-18 02:26:11 -05:00
kaitranntt 5b3d56548a feat(dashboard): add error log viewer for CLIProxy diagnostics
Add ErrorLogsMonitor component to Home page that displays CLIProxyAPI
error logs when requests fail. Users can now diagnose why success rates
drop by viewing detailed error log contents.

Backend:
- Add fetchCliproxyErrorLogs/fetchCliproxyErrorLogContent in stats-fetcher
- Add GET /api/cliproxy/error-logs and /api/cliproxy/error-logs/:name routes
- Include path traversal protection for filename validation

Frontend:
- Add CliproxyErrorLog type and errorLogs API methods
- Add useCliproxyErrorLogs/useCliproxyErrorLogContent hooks
- Create ErrorLogsMonitor component with expandable log viewer
- Integrate into Home page below AuthMonitor

Closes #132
2025-12-18 02:15:35 -05:00
semantic-release-bot 15927b8e58 chore(release): 6.3.0 [skip ci]
# [6.3.0](https://github.com/kaitranntt/ccs/compare/v6.2.1...v6.3.0) (2025-12-18)

### Bug Fixes

* **dashboard:** detect legacy proxy instances without session lock ([85cfbde](https://github.com/kaitranntt/ccs/commit/85cfbde5fd95850a28e962be01fc8655a69e8b1c))

### Features

* **cliproxy:** default session persistence for CLIProxy ([a7450bd](https://github.com/kaitranntt/ccs/commit/a7450bdffeb9679a02608cb76686e006afa6455f)), closes [#129](https://github.com/kaitranntt/ccs/issues/129)
* **dashboard:** add CLIProxy status widget with start button ([589cd2c](https://github.com/kaitranntt/ccs/commit/589cd2c2b7607b1092f6ee1ce4bf044269ba05e5))
2025-12-18 06:49:10 +00:00
Kai (Tam Nhu) TranandGitHub 1f0e270fca Merge pull request #131 from kaitranntt/dev
feat(release): CLIProxy session persistence and dashboard status widget
2025-12-18 01:48:13 -05:00
github-actions[bot] 1a140e4a32 chore(release): 6.2.1-dev.2 [skip ci] 2025-12-18 06:46:12 +00:00
kaitranntt b4a63b6b71 docs(claude): restructure CLAUDE.md for clearer quality gate workflow
- Add Common Mistakes section to prevent format step being skipped
- Make pre-commit sequence explicit: format → lint:fix → validate
- Explain WHY this order matters (validate only checks, doesn't fix)
- Condense branching section from 110+ to 35 lines
- Merge 3 checklists into 1 unified Pre-Commit Checklist
- Remove duplicate ESLint/TS tables (now single merged table)
- Reduce total lines from 407 to 273 (-33%)
2025-12-18 01:43:58 -05:00
github-actions[bot] 26f45604ff chore(release): 6.2.1-dev.1 [skip ci] 2025-12-18 06:42:01 +00:00
Kai (Tam Nhu) TranandGitHub e222332e86 Merge pull request #130 from kaitranntt/kai/feat/session-persistence
feat(cliproxy): session persistence and dashboard status widget
2025-12-18 01:41:01 -05:00
kaitranntt 63bdc3ae39 fix(copilot): widen sidebar and balance split-view layout
- Increase sidebar width from w-64 to w-80 (320px)
- Increase model name truncation from 100px to 160px
- Balance config form split-view to 50%/50%
2025-12-18 01:38:02 -05:00
kaitranntt 770c17e71c test(cliproxy): add lifecycle tests for stop/status commands
Add comprehensive unit tests for CLIProxy proxy lifecycle:
- Status command logic: session lock exists/not, uptime formatting
- Stop command logic: stale lock cleanup, active proxy stop
- Command routing: stop/status subcommands, unknown handling

Tests cover the CLI handlers for the new proxy persistence feature.
2025-12-18 01:37:24 -05:00
kaitranntt 85cfbde5fd fix(dashboard): detect legacy proxy instances without session lock
Proxy status endpoint now falls back to port check when session tracker
has no data. Handles proxies started before session persistence feature.
2025-12-18 01:30:35 -05:00
kaitranntt 589cd2c2b7 feat(dashboard): add CLIProxy status widget with start button 2025-12-18 01:26:30 -05:00
semantic-release-bot a68aa26824 chore(release): 6.2.1 [skip ci]
## [6.2.1](https://github.com/kaitranntt/ccs/compare/v6.2.0...v6.2.1) (2025-12-18)

### Bug Fixes

* **ui:** add error state handling to API Profiles page ([2e77646](https://github.com/kaitranntt/ccs/commit/2e77646d607676fee1297948878cd4ba1939c58f)), closes [#125](https://github.com/kaitranntt/ccs/issues/125)
* **websearch:** pass through to native WebSearch for account profiles ([6bd1f42](https://github.com/kaitranntt/ccs/commit/6bd1f420d994e799125f338940689e969e524991))
2025-12-18 06:11:54 +00:00
Kai (Tam Nhu) TranandGitHub b1c7c459bb Merge pull request #128 from kaitranntt/dev
fix(release): v6.2.0-dev.2 - WebSearch native passthrough and UI improvements
2025-12-18 01:10:51 -05:00
kaitranntt 81463eda65 test(cliproxy): add tests for stopProxy and getProxyStatus
Add unit tests for the new session tracker functions:
- stopProxy: error handling, stale lock cleanup, success structure
- getProxyStatus: not running, full status, dead proxy cleanup, session count
2025-12-18 01:04:33 -05:00
kaitranntt a7450bdffe feat(cliproxy): default session persistence for CLIProxy
CLIProxy now persists by default after terminal closes:
- Spawn proxy with detached mode (survives terminal close)
- Remove auto-kill on Claude exit (proxy keeps running)
- Add `ccs cliproxy stop` to explicitly terminate proxy
- Add `ccs cliproxy status` to show running proxy info

Closes #129
2025-12-18 00:57:09 -05:00
github-actions[bot] 641dc4b67a chore(release): 6.2.0-dev.2 [skip ci] 2025-12-18 05:34:22 +00:00
Kai (Tam Nhu) TranandGitHub 7d03933f44 Merge pull request #127 from kaitranntt/kai/fix/websearch-hook-native-passthrough
fix(websearch): pass through to native WebSearch for account profiles
2025-12-18 00:33:19 -05:00
kaitranntt 6bd1f420d9 fix(websearch): pass through to native WebSearch for account profiles
WebSearch hook was blocking native Claude accounts (ccs ck, default)
with "No Providers Enabled" message instead of passing through to
server-side WebSearch.

Changes:
- Add shouldSkipHook() detection for account/default profile types
- Fix blocking bug: exit(0) when no providers enabled instead of blocking
- Pass CCS_PROFILE_TYPE and CCS_WEBSEARCH_SKIP env vars for profile-aware behavior
- Add profile type signals to settings, cliproxy, account, and default execution paths
2025-12-18 00:27:40 -05:00
github-actions[bot] 7b40929a78 chore(release): 6.2.0-dev.1 [skip ci] 2025-12-18 05:27:35 +00:00
Kai (Tam Nhu) TranandGitHub e4ee713d11 Merge pull request #126 from kaitranntt/kai/fix/api-profiles-empty-state
fix(ui): add error state handling to API Profiles page
2025-12-18 00:26:32 -05:00
kaitranntt 7886259c36 feat(copilot): redesign config form to match CLIProxy pattern
- Split-view layout (40% left / 60% right) matching CLIProxy design
- Left panel: Model Config tab with FlexibleModelSelector components,
  Settings tab, and Info tab
- Right panel: Raw JSON editor for copilot.settings.json
- Add preset buttons for quick model tier mapping
- Bidirectional sync between UI and raw JSON
- Simplify copilot.tsx page layout with narrower sidebar
2025-12-18 00:22:14 -05:00
kaitranntt 882792a4fb feat(copilot): add raw settings support to useCopilot hook
Add CopilotRawSettings interface and API functions for reading/writing
copilot.settings.json with conflict detection via expectedMtime.
2025-12-18 00:21:33 -05:00
kaitranntt 2e77646d60 fix(ui): add error state handling to API Profiles page
Adds proper error handling when useProfiles() hook fails to fetch data.
Previously, API errors would cause a blank screen as the component had
no error state handling. Now shows a user-friendly error message with
a retry button.

Fixes #125
2025-12-18 00:20:25 -05:00
kaitranntt a3e2153498 feat(copilot): add raw settings API and model mapping routes
- add GET/PUT /api/copilot/settings/raw for copilot.settings.json

- update PUT /api/copilot/config to handle model mapping fields

- sync model mappings between settings file and unified config
2025-12-18 00:19:32 -05:00
kaitranntt d21908ab63 feat(copilot): add model tier mapping support
- add opus_model, sonnet_model, haiku_model to CopilotConfig

- update generateCopilotEnv to use tier-specific models

- fall back to default model when tier not configured
2025-12-18 00:19:11 -05:00
kaitranntt 2145e62ddd docs(help): add GitHub Copilot section to --help output
- add new major section for copilot integration

- document all copilot subcommands (auth, status, models, start, stop, enable, disable)

- show prerequisite: npm install -g copilot-api
2025-12-17 22:15:19 -05:00
kaitranntt 6b04532f41 feat(ui): add copilot dashboard page
- use-copilot.ts: React hook for copilot state management

- copilot-status-card.tsx: status display with auth/daemon controls

- copilot-config-form.tsx: configuration form with model selector

- copilot.tsx: main page combining status and config

- add /copilot route and sidebar navigation
2025-12-17 21:41:06 -05:00
kaitranntt c84db38f6a feat(api): add copilot REST API endpoints
- GET/PUT /api/copilot/config for configuration

- GET /api/copilot/status for integration status

- POST /api/copilot/auth/start for OAuth flow

- GET /api/copilot/models for available models

- POST /api/copilot/daemon/start|stop for daemon control
2025-12-17 21:39:37 -05:00
kaitranntt d25db1fce1 feat(cli): add copilot CLI commands
- add 'ccs copilot' subcommand with auth, status, models, start, stop, enable, disable

- route 'ccs copilot' as profile name to copilot executor

- integrate copilot command into main CLI entry point
2025-12-17 21:39:01 -05:00
kaitranntt e5a1f60bb6 feat(auth): add copilot profile detection
- add 'copilot' to ProfileType union

- detect copilot profile with enabled check

- include copilot in listAvailableProfiles() when enabled
2025-12-17 21:38:33 -05:00
kaitranntt 3b8a85c9ef feat(copilot): add copilot manager module
- copilot-auth.ts: GitHub OAuth handling via copilot-api

- copilot-daemon.ts: daemon lifecycle (start/stop/status)

- copilot-models.ts: model catalog with Anthropic/OpenAI models

- copilot-executor.ts: profile execution and env generation

- types.ts: CopilotStatus, CopilotModel interfaces
2025-12-17 21:38:11 -05:00
kaitranntt b87aeaeb01 feat(config): add copilot configuration types and loader
- add CopilotConfig interface with account_type, port, model settings

- add DEFAULT_COPILOT_CONFIG with safe opt-in defaults

- bump UNIFIED_CONFIG_VERSION from 3 to 4

- add YAML generation for copilot section

- add 'copilot' to reserved profile names
2025-12-17 21:36:59 -05:00
semantic-release-bot afe0f66b9f chore(release): 6.2.0 [skip ci]
# [6.2.0](https://github.com/kaitranntt/ccs/compare/v6.1.0...v6.2.0) (2025-12-18)

### Bug Fixes

* **ui:** improve account flow viz layout to fill available width ([7b876d2](https://github.com/kaitranntt/ccs/commit/7b876d23647eb190156e832df0b9bac6b7a6935f))
* **ui:** improve account-flow-viz layout and styling ([ee85a1f](https://github.com/kaitranntt/ccs/commit/ee85a1fd82c570e4c9296c746673c57a140f1677))
* **ui:** optimize bundle size and fix calendar crash ([572703f](https://github.com/kaitranntt/ccs/commit/572703f4399ae49dc73c3e1bdf00611a859a0f0f))
* **ui:** unify account card padding and fix SVG glow filter ([ab4c95b](https://github.com/kaitranntt/ccs/commit/ab4c95bac9a64145ab24ccc1f8f143be4f64d06b))

### Features

* **cliproxy:** remove thinking token cap and update agy haiku model ([925ac8e](https://github.com/kaitranntt/ccs/commit/925ac8e1d47066bf6bfa2e9a36a31ee972a1beb8))
* **ui:** add ClaudeKit badge and Sponsor buttons to navbar ([9028b74](https://github.com/kaitranntt/ccs/commit/9028b742f8f764217ccb04335d94c88966cbbb71))
* **ui:** add multi-zone layout and enhanced drag features to account flow viz ([365f820](https://github.com/kaitranntt/ccs/commit/365f820c55106b7a4c1e2af40637144fb58c7644))
* **ui:** extend privacy mode to blur cost/token values in analytics ([2bf7992](https://github.com/kaitranntt/ccs/commit/2bf7992a8a6cb316b252c6b6e20df7860b1b2b8e))
2025-12-18 00:02:11 +00:00