Files
Claude-Code-Workflow/ccw/src/tools
catlog22 abce912ee5 feat(frontend): implement comprehensive API Settings Management Interface
Implement a complete API Management Interface for React frontend with split-
panel layout, migrating all features from legacy JS frontend.

New Features:
- API Settings page with 5 tabs: Providers, Endpoints, Cache, Model Pools, CLI Settings
- Provider Management: CRUD operations, multi-key rotation, health checks, test connection
- Endpoint Management: CRUD operations, cache strategy configuration, enable/disable toggle
- Cache Settings: Global configuration, statistics display, clear cache functionality
- Model Pool Management: CRUD operations, auto-discovery feature, provider exclusion
- CLI Settings Management: Provider-based and Direct modes, full CRUD support
- Multi-Key Settings Modal: Manage API keys with rotation strategies and weights
- Manage Models Modal: View and manage models per provider (LLM and Embedding)
- Sync to CodexLens: Integration handler for provider configuration sync

Technical Implementation:
- Created 12 new React components in components/api-settings/
- Extended lib/api.ts with 460+ lines of API client functions
- Created hooks/useApiSettings.ts with 772 lines of TanStack Query hooks
- Added RadioGroup UI component for form selections
- Implemented unified error handling with useNotifications across all operations
- Complete i18n support (500+ keys in English and Chinese)
- Route integration (/api-settings) and sidebar navigation

Code Quality:
- All acceptance criteria from plan.json verified
- Code review passed with Gemini (all 7 IMPL tasks complete)
- Follows existing patterns: Shadcn UI, TanStack Query, react-intl, Lucide icons
2026-02-01 23:58:04 +08:00
..

Tools

This directory contains CCW “tools”: self-contained modules that implement concrete functionality (executors, integrations, etc.) that higher-level CLI and route layers call into.

CLI Executor

The CLI executor is split into focused modules to keep responsibilities clear and keep the public API stable via re-exports.

Entry point

  • ccw/src/tools/cli-executor.ts thin facade that re-exports from cli-executor-core.ts (stable import path for callers).

Modules

  • ccw/src/tools/cli-executor-core.ts orchestrates tool execution, resume/merge logic, and conversation persistence wiring.
  • ccw/src/tools/cli-executor-utils.ts debug logging, tool availability checks (with cache), command building.
  • ccw/src/tools/cli-executor-state.ts conversation/history types + SQLite-backed storage helpers.
  • ccw/src/tools/cli-prompt-builder.ts prompt concatenation helpers (plain/YAML/JSON) and merged-conversation prompt formatting.

Dependency flow (high level)

cli-executor.ts
  -> cli-executor-core.ts
      -> cli-executor-utils.ts
      -> cli-executor-state.ts
      -> cli-prompt-builder.ts

Public API

  • Prefer importing from ccw/src/tools/cli-executor.ts.
  • cli-executor-core.ts re-exports prompt helpers/types from cli-prompt-builder.ts to preserve existing imports (PromptConcatenator, buildPrompt, PromptFormat, etc.).