Simplify Load button and remove skill error toast

This commit is contained in:
Chris Scott committed 2026-05-01 18:26:55 -04:00
1 parent 3aee66b333
commit 07b0e1548b
2 files changed
+8 -13

No files matched your search

+2 -4
View File
@@ -685,17 +685,15 @@ export const useLoadSkill = (
const response = await client.sendCommand(sessionID, { command: skillName, arguments: "" });
return { optimisticUserID, response };
},
onError: (error) => {
onError: () => {
if (sessionID) {
const messagesQueryKey = ["opencode", "messages", opcodeUrl, sessionID, directory];
setSessionStatus(sessionID!, { type: "idle" });
setSessionStatus(sessionID!, { type: "idle" });
queryClient.setQueryData<MessageWithParts[]>(
messagesQueryKey,
(old) => old?.filter((m) => !m.info.id.startsWith("optimistic_")),
);
}
const message = error instanceof Error ? error.message : "Failed to load skill";
showToast.error(message);
},
onSuccess: (data) => {
const { response } = data;