feat(cli-endpoints): add create, update, and delete functionality for CLI endpoints

- Implemented `useCreateCliEndpoint`, `useUpdateCliEndpoint`, and `useDeleteCliEndpoint` hooks for managing CLI endpoints.
- Added `CliEndpointFormDialog` component for creating and editing CLI endpoints with validation.
- Updated translations for CLI hooks and manager to include new fields and messages.
- Refactored `CcwToolsMcpCard` to simplify enabling and disabling tools.
- Adjusted `SkillCreateDialog` to display paths based on CLI type.
This commit is contained in:
catlog22
2026-02-07 21:56:08 +08:00
parent 678be8d41f
commit 6073627ff2
12 changed files with 1252 additions and 422 deletions

View File

@@ -28,6 +28,32 @@
"delete": "Delete Endpoint",
"toggle": "Toggle Endpoint"
},
"dialog": {
"createTitle": "Add Endpoint",
"editTitle": "Edit Endpoint ({id})"
},
"form": {
"name": "Name",
"namePlaceholder": "My endpoint",
"type": "Type",
"enabled": "Enabled",
"enabledHint": "Enable or disable this endpoint",
"configJson": "Configuration (JSON)",
"configJsonPlaceholder": "{\n \n}"
},
"validation": {
"nameRequired": "Name is required",
"typeRequired": "Type is required",
"invalidJson": "Invalid JSON",
"configMustBeObject": "Configuration must be a JSON object"
},
"messages": {
"created": "Endpoint created",
"updated": "Endpoint updated",
"deleted": "Endpoint deleted",
"saveFailed": "Failed to save endpoint",
"deleteFailed": "Failed to delete endpoint"
},
"deleteConfirm": "Are you sure you want to delete the endpoint \"{id}\"?",
"emptyState": {
"title": "No CLI Endpoints Found",