代码提交
This commit is contained in:
1 parent
fe7cdba07e
commit
106f1d1794
6 files changed
+294
-12
No files matched your search
@@ -162,6 +162,10 @@ export function useSetSkillPublished() {
|
||||
}) => setSkillPublished(skillName, published),
|
||||
onSuccess: () => {
|
||||
void queryClient.invalidateQueries({ queryKey: ["skills"] });
|
||||
// Unpublishing triggers the backend cascade that strips this skill
|
||||
// from every referencing agent's config.yaml, so the cached agent
|
||||
// list (agent.skills) is now stale.
|
||||
void queryClient.invalidateQueries({ queryKey: ["agents"] });
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -194,6 +198,10 @@ export function useDeleteCustomSkill() {
|
||||
mutationFn: (skillName: string) => deleteCustomSkill(skillName),
|
||||
onSuccess: () => {
|
||||
void queryClient.invalidateQueries({ queryKey: ["skills"] });
|
||||
// Deletion triggers the backend cascade that strips this skill from
|
||||
// every referencing agent's config.yaml, so the cached agent list
|
||||
// (agent.skills) is now stale.
|
||||
void queryClient.invalidateQueries({ queryKey: ["agents"] });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user