From 07b0e1548bed8371d3fdc3b7267656ff772c6fb2 Mon Sep 17 00:00:00 2001
From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com>
Date: Fri, 1 May 2026 18:26:55 -0400
Subject: [PATCH] Simplify Load button and remove skill error toast
---
frontend/src/components/repo/RepoSkillsList.tsx | 15 ++++++---------
frontend/src/hooks/useOpenCode.ts | 6 ++----
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/frontend/src/components/repo/RepoSkillsList.tsx b/frontend/src/components/repo/RepoSkillsList.tsx
index 0c102a5c..72e7a09e 100644
--- a/frontend/src/components/repo/RepoSkillsList.tsx
+++ b/frontend/src/components/repo/RepoSkillsList.tsx
@@ -1,5 +1,4 @@
-import { AlertCircle, Loader2, Sparkles } from 'lucide-react'
-import { Button } from '@/components/ui/button'
+import { AlertCircle, Loader2 } from 'lucide-react'
import type { SkillFileInfo } from '@opencode-manager/shared'
interface RepoSkillsListProps {
@@ -74,15 +73,13 @@ export function RepoSkillsList({
)}
{onLoad && (
-
+ Load
+
)}
))}
diff --git a/frontend/src/hooks/useOpenCode.ts b/frontend/src/hooks/useOpenCode.ts
index d684cdbf..30036055 100644
--- a/frontend/src/hooks/useOpenCode.ts
+++ b/frontend/src/hooks/useOpenCode.ts
@@ -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(
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;