Merge branch 'main' into fix/common-config-sync-improvements

This commit is contained in:
YoVinchen
2026-01-29 22:38:35 +08:00
14 changed files with 339 additions and 6 deletions
+20
View File
@@ -147,6 +147,26 @@ export function useRemoveSkillRepo() {
});
}
/**
* 从 ZIP 文件安装 Skills
*/
export function useInstallSkillsFromZip() {
const queryClient = useQueryClient();
return useMutation({
mutationFn: ({
filePath,
currentApp,
}: {
filePath: string;
currentApp: AppType;
}) => skillsApi.installFromZip(filePath, currentApp),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ["skills", "installed"] });
queryClient.invalidateQueries({ queryKey: ["skills", "unmanaged"] });
},
});
}
// ========== 辅助类型 ==========
export type { InstalledSkill, DiscoverableSkill, AppType };