fix: synchronize skill deletion server-side (#12)

This commit is contained in:
Felipe Domingues 2026-05-30 15:39:17 -03:00 committed by GitHub
parent fd06a4bb07
commit cd4eb53304
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 253 additions and 30 deletions

22
src/lib/delete-skill.ts Normal file
View file

@ -0,0 +1,22 @@
"use client";
import { invokeFunction } from "@/lib/invoke-function";
export interface DeleteSkillResponse {
success: boolean;
skill_id: string;
agent_instance_id: string;
archived: boolean;
deleted: boolean;
runtime_sync_warning: string | null;
}
export async function deleteSkill(
skillId: string,
action: "archive" | "delete" = "archive",
) {
return await invokeFunction<DeleteSkillResponse>("delete-skill", {
skill_id: skillId,
action,
});
}