mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-16 17:59:32 +08:00
refactor(deeplink): extend support for multi-resource imports
Extend the deeplink import system to support importing multiple resource types beyond providers: prompts, MCP servers, and skills. Breaking changes: - DeepLinkImportRequest: Convert required fields to Optional to support different resource types (app, name, homepage, endpoint, apiKey are now Option<String>) - Add resource-specific fields for prompt, mcp, and skill imports New features: - parse_prompt_deeplink: Parse prompt import URLs with base64 content - parse_mcp_deeplink: Parse MCP server import URLs with config - parse_skill_deeplink: Parse GitHub skill repository URLs - import_prompt_from_deeplink: Import prompts to database - import_mcp_from_deeplink: Batch import MCP servers with multi-app support - import_skill_from_deeplink: Clone and install skill repositories Data model additions: - Prompt fields: content (base64), description, enabled - MCP fields: apps (comma-separated), config, config_format - Skill fields: repo, directory, branch, skills_path - Common fields: icon (provider icon name) McpImportResult type: - imported_count: Number of successfully imported servers - imported_ids: List of imported server IDs - failed: List of failed imports with error messages URL format examples: - Prompt: ccswitch://v1/import?resource=prompt&app=claude&name=...&content=... - MCP: ccswitch://v1/import?resource=mcp&apps=claude,codex&config=... - Skill: ccswitch://v1/import?resource=skill&repo=owner/name&directory=... This refactor enables one-click sharing of prompts, MCP configurations, and skill repositories via deeplink URLs.
This commit is contained in:
+938
-113
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user