Commit Graph
265 Commits
Author SHA1 Message Date
kaitranntt 5074122d4a feat(ui): add provider logos for alternative API presets
Add icons for GLM, GLMT (Z.AI), Kimi, Azure Foundry, Minimax, DeepSeek, and Qwen presets.
2026-01-22 16:29:30 -05:00
Kai (Tam Nhu) TranandGitHub 4dc6bbaf4c Merge pull request #354 from jellydn/feat/ollama-provider
feat: add Ollama provider support
2026-01-22 15:21:09 -05:00
kaitranntt 8e29c48c6d fix(presets): make requiresApiKey required boolean, add sentinel docs
- Change requiresApiKey from optional to required boolean in CLI
- Add requiresApiKey: true to all existing presets for consistency
- Document 'ollama' placeholder as sentinel value in code comment
- Add trailing newline to ollama.svg
2026-01-22 15:17:06 -05:00
kaitranntt 3ce698c5fe fix(ollama): align property naming and descriptions
- Change CLI noApiKey to requiresApiKey to match UI convention
- Set apiKey='ollama' instead of empty string for local Ollama
- Align ollama-cloud descriptions between CLI/UI
- Keep https://ollama.com endpoint for direct API access
2026-01-22 15:02:49 -05:00
kaitranntt 2cb77f2dfd feat(ui): add Ollama logo and make API key optional
- Add Ollama SVG logo to ui/public/icons/
- Add icon property to both ollama and ollama-cloud presets
- Make API key field optional for local Ollama (show input with hint)
- Update placeholder: "Optional - only if auth is enabled"
- Allows power users with Ollama auth configured to provide key
2026-01-22 14:24:37 -05:00
kaitranntt 2b7d18c4c6 feat(ui): add Ollama provider presets to dashboard
- Add ollama (local) and ollama-cloud presets to UI provider-presets.ts
- Update profile-create-dialog to handle requiresApiKey: false
- Show "No API Key Required" info box for local Ollama
- Add --api-key ignored warning to CLI for local Ollama preset
- Add ollama-cloud to CLI help text preset list

Fixes edge cases identified in PR review:
- UI dashboard now has parity with CLI Ollama support
- Conditional API key validation in profile creation form
2026-01-22 14:09:59 -05:00
kaitranntt ca490a9f4e fix(cliproxy): handle edge cases in thinking validation
- model-catalog: add null guard and trim for modelId lookup
- thinking-validator: add 100 char length limit, accept "8192.0" format
- cliproxy-executor: error on empty --thinking= value
- use-thinking-config: handle HTML error pages, return cleanup fn
2026-01-21 17:52:16 -05:00
kaitranntt 3df6587e8d chore(ui): regenerate lockfile after dependency removal 2026-01-21 17:30:25 -05:00
kaitranntt 4491d9f3d3 chore(deps): remove unused auth dependencies from ui
- Remove bcrypt, express-rate-limit, express-session
- Remove @types/bcrypt, @types/express-session
- Clean up unused server-side auth packages
2026-01-21 17:26:07 -05:00
kaitranntt 19b7a49eee feat(thinking): improve config validation and codex support
- Add shouldShowWarnings() helper for cleaner warning control
- Improve applyThinkingSuffix() regex for accurate suffix detection
- Fix provider_overrides validation for nested tier structure
- Add thinking section to YAML config export with documentation
- Update UI to clarify codex uses reasoning effort levels
- Remove unused setManualOverride hook
2026-01-21 17:25:33 -05:00
kaitranntt eec44d54e2 feat(cliproxy): add model-specific reasoning effort caps
Add maxLevel field to ThinkingSupport interface to cap reasoning
effort at model's maximum supported level. This fixes Issue #344
where gpt-5-mini fails with xhigh reasoning (only supports high).

- Add Codex provider to model catalog with gpt-5.2-codex and gpt-5-mini
- Add capLevelAtMax() and capEffortAtModelMax() for runtime capping
- Update UI presets with new Codex models and tier mappings
2026-01-21 14:27:46 -05:00
kaitranntt 2f584802bd chore(deps): add bcrypt, express-session, express-rate-limit for dashboard auth 2026-01-20 20:20:23 -05:00
kaitranntt 99d164901e Merge remote-tracking branch 'origin/dev' into feat/thinking-flag
Resolve merge conflicts keeping both features:
- thinking: extended thinking/reasoning budget control
- dashboard_auth: dashboard authentication
- backups: config backups section
2026-01-20 20:19:51 -05:00
kaitranntt 1eeb8f922d fix(ui): add spacing between Port label and input field
Changed layout from vertical stack (space-y-1) to horizontal flex
with gap (flex items-center gap-2) to properly space the Port label
and input field in the local proxy settings card.
2026-01-18 15:45:28 -05:00
kaitranntt a019ed2cf8 fix(cliproxy): address PR review issues for backend selection
- Remove duplicate CLIProxyBackend type from platform-detector.ts (import from types.ts)
- Add warning for invalid --backend CLI value (was silently ignored)
- Show toast notification when backend change blocked by running proxy
- Migrate from deprecated CLIPROXY_FALLBACK_VERSION to getFallbackVersion()
- Add comprehensive JSDoc for backend API endpoints
2026-01-18 10:24:53 -05:00
kaitranntt 8ade4a6b26 feat(cliproxy): add backend selection for CLIProxyAPI vs CLIProxyAPIPlus
Add cliproxy.backend config field to choose between CLIProxyAPI (original)
and CLIProxyAPIPlus backends. Includes CLI --backend flag, Dashboard toggle,
and provider validation to block Kiro/ghcp on original backend.
2026-01-18 10:10:01 -05:00
Kai (Tam Nhu) TranandGitHub 126b244b36 Merge pull request #338 from kaitranntt/kai/fix/pause-account-cliproxy-usage
fix(cliproxy): move token files when pausing/resuming accounts
2026-01-15 13:06:50 -05:00
kaitranntt 502b30a589 fix(ui): improve paused account display in Live Account Monitor
- Add Pause icon with amber color for paused accounts
- Show styled "PAUSED" badge instead of plain error text
- Distinguish paused state from other errors visually
2026-01-15 13:04:17 -05:00
kaitranntt 28b0faa0cb feat(dashboard): show projectId warning in Live Account Monitor
Add warning indicator on Antigravity account dots when projectId is
missing. Matches the warning shown in Provider Editor for consistency.
2026-01-15 11:59:41 -05:00
kaitranntt bc02ecc94c fix(dashboard): harden projectId handling with edge case fixes
- Validate empty string projectId with typeof check and trim()
- Include projectId in registerAccount return value
- Update projectId when changed (not just when missing)
- Add aria-hidden/aria-label for accessibility
- Add max-width + truncate for long projectId overflow
2026-01-15 11:46:02 -05:00
kaitranntt ed2ce138e4 feat(dashboard): add project_id display for Antigravity accounts
Display GCP project_id for Antigravity (agy) accounts in the Dashboard:

- Add projectId field to AccountInfo interface (account-manager.ts)
- Read project_id from auth files when discovering/registering accounts
- Pass projectId through token-manager when registering new accounts
- Add projectId to OAuthAccount type (api-client.ts)
- Add projectId to AccountRow type (auth-monitor/types.ts)
- Display project_id in account-item.tsx with FolderCode icon
- Show N/A warning with amber tooltip if project_id is missing
  suggesting user remove and re-add account to fetch it

Note: project_id is read-only and respects privacy mode blur.
2026-01-15 10:49:23 -05:00
kaitranntt 7b80dccdd3 fix(persist): add rate limiting, tests, and code quality improvements
- Add express-rate-limit to restore endpoint (5 req/min)
- Add JSDoc documentation to RestoreMutex class
- Extract magic numbers to named constants in BackupsSection
- Add unit tests for persist-routes.ts (23 tests)
- Add unit tests for BackupsSection component (28 tests)

Addresses PR #339 code review feedback.
2026-01-14 17:59:15 -05:00
kaitranntt e808972df0 fix(dashboard): address code review feedback for PR #336
- Fix documentation: config.yaml -> settings.json in backups-section
- Wrap restoreBackup in useCallback for callback stability
- Auth middleware verified: inherited from app.use(authMiddleware)
2026-01-14 16:51:56 -05:00
kaitranntt 623a3146d7 fix(dashboard): resolve 6 critical security and UX edge cases
- TOCTOU symlink attack: use file descriptor for atomic read in persist-routes
- Non-atomic mutex: add RestoreMutex class with Promise queue pattern
- Restore confirmation: add AlertDialog before destructive backup restore
- Sensitive data exposure: sanitize auth_token/management_key in debug console
- Chunk retry: add lazyWithRetry wrapper with exponential backoff (3 retries)
- URL tab case sensitivity: normalize tab param with toLowerCase()
2026-01-14 16:47:11 -05:00
kaitranntt 2e45447bb7 fix(dashboard): resolve edge cases in backup restore and settings UI
Backend:
- Add atomic restore with mutex to prevent concurrent corruption
- Implement rollback on failure for backup restore
- Add symlink security validation

Frontend:
- Add 'backups' tab to URL validation in settings hook
- Add error boundary for lazy-loaded settings sections
- Clamp progress bar values to prevent visual bugs
- Add AbortController cleanup to prevent memory leaks
- Fix misleading debug mode description and add actual console logging
2026-01-14 15:42:12 -05:00
kaitranntt bd5e9d2b78 feat(dashboard): implement full parity UX improvements
- Remove 'agy' hardcode from quota hook (multi-provider support)
- Add quota N/A badge with AlertCircle icon for fetch failures
- Add new 'backups' tab to Settings page with Archive icon
- Create BackupsSection component with list/restore UI
- Add persist backend routes (GET /api/persist/backups, POST /api/persist/restore)
- Add debug mode toggle in Settings proxy section (localStorage persisted)

Closes documentation gap for persist command dashboard parity.
2026-01-14 13:52:54 -05:00
SergeyandGitHub db58c6bbca fix(ui): use wss:// for WebSocket on HTTPS pages (#315) 2026-01-14 08:34:53 -05:00
kaitranntt 37e3468d4d fix(auth): move redirect to useEffect and validate bcrypt hash format
- Fix React side effect: move navigate() to useEffect in LoginPage
- Remove misplaced express-rate-limit from ui/package.json
- Add bcrypt hash format validation before bcrypt.compare
2026-01-13 14:43:55 -05:00
kaitranntt 464b410e8b feat(dashboard): add optional login authentication (#319)
Add session-based username/password auth for CCS dashboard:
- Backend: Express session middleware with bcrypt password verification
- Frontend: React AuthContext, login page, protected routes
- Config: dashboard_auth section in config.yaml + env var overrides
- Security: Rate limiting (5 attempts/15min), persistent session secret
- 16 unit tests for auth middleware

Auth disabled by default for backward compatibility.
2026-01-13 13:27:38 -05:00
kaitranntt 12b68f9f13 fix(ui): improve sidebar navigation for collapsible menu items
- CLIProxy Plus click now navigates to Overview AND opens submenu
- Parent menu item highlights when any child route is active
- Provides consistent visual hierarchy across all collapsible menus
2026-01-11 14:49:41 -05:00
kaitranntt c8c1894272 fix(ui): reduce excessive AGY quota API requests
- Match staleTime to refetchInterval (60s) to prevent early refetches

- Disable refetchOnWindowFocus to prevent tab switch triggers

- Disable refetchOnMount to prevent HMR/navigation remount triggers
2026-01-09 00:11:18 -05:00
kaitranntt 35f28a6e77 fix(ui): add provider indicator, retry button, and optimistic locking
- U4: add blue info box showing supported providers

- W1: add inline retry button in error alert

- W4: track lastModified, handle 409 conflict with auto-refresh
2026-01-08 16:56:05 -05:00
kaitranntt 3ea549addd fix(ui): add thinking tab to URL sync conditional 2026-01-08 16:26:50 -05:00
kaitranntt b996153e7f fix(ui): add missing useThinkingConfig export to barrel file 2026-01-08 16:24:17 -05:00
kaitranntt b634f365f3 fix(ui): add fetch timeout and abort controller cleanup
- Add 10s timeout for API requests using AbortController
- Clean up pending requests on unmount to prevent memory leaks
2026-01-08 15:49:40 -05:00
kaitranntt 0a95f361a2 feat(ui): add Thinking settings tab to dashboard
- add ThinkingSection with mode selector and tier defaults

- add useThinkingConfig hook for API integration

- add tab navigation for Thinking settings

- add ThinkingConfig types for UI

Refs #307
2026-01-08 15:20:12 -05:00
kaitranntt db071e2ff2 refactor(quota): simplify AccountTier to free|paid|unknown
- consolidate 'pro'/'ultra' into single 'paid' tier (no distinction needed)
- update mapTierString() and inferTierFromModels() in quota-fetcher.ts
- fix tier_priority default from ['ultra','pro'] to ['paid']
- add missing quota_management to mergeWithDefaults() in config-loader
- update UI tier badge styling for 'paid' tier
- update api-client.ts tier type definition
2026-01-06 16:53:21 -05:00
kaitranntt a32fdc8cfb fix(quota): address edge cases from code review
- Add isPausingAccount disabled state to pause/resume dropdown (#30)
- Add rapid click prevention guard in cliproxy.tsx (#31)
- Add request deduplication via pendingFetches Map in quota-manager (#8)
- Add JSON parse error handler middleware in web-server (#26)
2026-01-06 13:05:45 -05:00
kaitranntt 4ad7292700 feat(ui): add pause/resume toggle and tier badges
- add pause/resume dropdown menu option in account item

- display tier badges (ultra/pro/free) with color coding

- show paused badge when account is paused

- wire onPauseToggle through component tree

Refs #282
2026-01-06 12:18:12 -05:00
kaitranntt b92a35d09b feat(ui): add pause/resume API hooks
- add api.cliproxy.accounts.pause/resume methods

- add usePauseAccount, useResumeAccount hooks

Refs #282
2026-01-06 12:18:02 -05:00
kaitranntt 4fd4d6c264 fix(ui): add missing isStable and maxStableVersion to type 2026-01-05 14:54:27 -05:00
kaitranntt 4f69abbe88 fix(ui): clean up ProxyStatusWidget layout spacing
- Separate header row (title + icon buttons) from version row
- Compact update badge: h-4, px-1.5, gap-0.5
- Slightly more margin between rows (mt-1.5)
- Fix badge conditional rendering
2026-01-05 14:31:55 -05:00
kaitranntt 8072b93b3b refactor(ui): redesign ProxyStatusWidget with two-state UX
- Replace 4-button row with 3 icon buttons (restart, stop, settings)
- Add tooltips to all icon buttons via TooltipProvider
- Move version display to header next to title
- Implement collapsed/expanded two-state design
- Remove manual version input field (use dropdown only)
- Add clickable update/downgrade badge showing target version
- Add "Version Management" section header in expanded view
- Increase control sizes (h-8) for better touch targets
- Settings icon toggles to X when expanded
2026-01-05 13:49:24 -05:00
kaitranntt 48d4a96a62 fix(ui): update/downgrade button now installs correct version
The button was incorrectly calling handleRestart (pure restart) instead
of triggering version install. Now correctly installs latestVersion for
updates or maxStableVersion for downgrades.
2026-01-05 13:21:31 -05:00
kaitranntt a69b2e9d10 feat(cliproxy): add version management UI with install/restart controls
Implements comprehensive version management for CLIProxyAPI Plus:

Backend APIs:
- GET /versions: fetch available versions from GitHub releases
- POST /install: install specific version with force flag for unstable
- POST /restart: restart proxy without version change

Frontend:
- 4-button layout: Restart, Update/Downgrade, Stop, Settings gear
- Collapsible version picker with dropdown + manual input
- Confirmation dialog for unstable versions (>6.6.80)
- Progressive disclosure (version picker hidden by default)

Ref: plans/260105-1250-cliproxy-version-management/
2026-01-05 13:12:46 -05:00
kaitranntt 8a56a43989 feat(ui): add stability warning to ProxyStatusWidget
- Show amber warning indicator when installed version is unstable (v81+)
- Version display now shows "(unstable)" suffix with amber styling
- "Downgrade" button replaces "Update" when version is unstable
- Tooltip explains restart will downgrade to stable version
2026-01-05 12:46:35 -05:00
kaitranntt c5621dab51 feat(cliproxy): add dashboard UI parity for version stability
Add version stability warnings to Dashboard API and UI:
- Extend /api/cliproxy/update-check with isStable, maxStableVersion, stabilityMessage
- Health check shows warning status for v81+ installations
- UI header displays version badge with amber warning for unstable

Closes: relates to #269
2026-01-05 12:10:32 -05:00
kaitranntt 0e58d0e8b7 fix(cliproxy): add management_key support for remote proxy auth separation
- Add management_key field to CliproxyServerConfig for separate management API auth
- Update proxy-target-resolver with buildManagementHeaders() for /v0/management/* endpoints
- Update stats-fetcher and remote-auth-fetcher to use management headers
- Add management_key input field to dashboard remote proxy settings
- Disable quota UI in remote mode (tokens on remote server)
- Fix preset application to use dynamic API key from config instead of hardcoded placeholder
2026-01-02 22:31:28 -05:00
kaitranntt a59ad0e8c6 fix(minimax): prevent double-resolve race condition and align placeholder
- Add resolved flag + safeResolve() wrapper to prevent timeout/response race
- Align apiKeyPlaceholder to YOUR_MINIMAX_API_KEY_HERE across presets
2026-01-02 20:06:17 -05:00
Huynh Duc Dung 2b549f5b3d refactor(minimax): Rename to 'mm' for brevity
- Rename profile ID: minimax -> mm
- Rename settings file: base-minimax.settings.json -> base-mm.settings.json
- Update all code references
- Remove review_pr.md documentation
- Shorter CLI command: ccs mm instead of ccs minimax

Rationale:
- 'mm' is more concise (2 chars vs 7 chars)
- Matches 'glm', 'kimi' short naming pattern
- Improves UX for frequent switching
2026-01-02 20:38:52 +08:00