mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-08 00:16:45 +00:00
fix: synchronize skill deletion server-side (#12)
This commit is contained in:
parent
fd06a4bb07
commit
cd4eb53304
4 changed files with 253 additions and 30 deletions
22
src/lib/delete-skill.ts
Normal file
22
src/lib/delete-skill.ts
Normal 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,
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue