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:
Jason
2026-01-03 10:04:46 +08:00
parent 6460c1d5dd
commit 86e802bd4b
10 changed files with 93 additions and 13 deletions
+7
View File
@@ -119,4 +119,11 @@ export const mcpApi = {
): Promise<void> {
return await invoke("toggle_mcp_app", { serverId, app, enabled });
},
/**
* 从所有应用导入 MCP 服务器
*/
async importFromApps(): Promise<number> {
return await invoke("import_mcp_from_apps");
},
};