mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-27 08:14:33 +08:00
feat(mcp): add import button to import MCP servers from apps
- Add import_mcp_from_apps command that reuses existing import logic - Add Import button in MCP panel header (consistent with Skills) - Fix import count to only return truly new servers (not already in DB) - Update translations for import success/no-import messages (zh/en/ja)
This commit is contained in:
@@ -59,3 +59,16 @@ export function useDeleteMcpServer() {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 从所有应用导入 MCP 服务器
|
||||
*/
|
||||
export function useImportMcpFromApps() {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: () => mcpApi.importFromApps(),
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ["mcp", "all"] });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user