diff --git a/scripts/generate-tools-json.ts b/scripts/generate-tools-json.ts
new file mode 100644
index 0000000..86a781a
--- /dev/null
+++ b/scripts/generate-tools-json.ts
@@ -0,0 +1,22 @@
+import { readdirSync, readFileSync, writeFileSync } from "fs";
+import { join } from "path";
+import type { Tool } from "../registry/commandly/lib/types/commandly";
+
+const collectionDir = join(process.cwd(), "public", "tools-collection");
+const files = readdirSync(collectionDir).filter((f) => f.endsWith(".json"));
+
+const tools = files.map((file) => {
+ const content = readFileSync(join(collectionDir, file), "utf-8");
+ const tool = JSON.parse(content) as Tool;
+ return {
+ name: tool.name,
+ displayName: tool.displayName || tool.name,
+ description: tool.description,
+ supportedInput: tool.supportedInput,
+ supportedOutput: tool.supportedOutput
+ };
+});
+
+const outputPath = join(process.cwd(), "public", "tools.json");
+writeFileSync(outputPath, JSON.stringify(tools, null, 2));
+console.log(`Generated tools.json with ${tools.length} tools.`);
diff --git a/skills-lock.json b/skills-lock.json
new file mode 100644
index 0000000..aa659c9
--- /dev/null
+++ b/skills-lock.json
@@ -0,0 +1,10 @@
+{
+ "version": 1,
+ "skills": {
+ "vercel-composition-patterns": {
+ "source": "vercel-labs/agent-skills",
+ "sourceType": "github",
+ "computedHash": "10eb4ec94577b79ae98c63ce3e7f35f8a6a06436a4011bff083b397de6960eeb"
+ }
+ }
+}
diff --git a/src/components/theme-switcher.tsx b/src/components/theme-switcher.tsx
index 24b216c..187a7bc 100644
--- a/src/components/theme-switcher.tsx
+++ b/src/components/theme-switcher.tsx
@@ -15,6 +15,9 @@ type Theme = "dark" | "light" | "system";
export function ThemeSwitcher() {
const { theme, setTheme } = useTheme();
const ref = useRef(null);
+ const [mounted, setMounted] = useState(false);
+
+ useEffect(() => setMounted(true), []);
const toggleDarkMode = async (theme: Theme) => {
if (
@@ -64,7 +67,7 @@ export function ThemeSwitcher() {
}
ref={ref}
>
- {theme === "dark" ? (
+ {(mounted ? theme === "dark" : true) ? (
) : (
@@ -104,7 +107,6 @@ export function ThemeProvider({
} else {
document.documentElement.classList.remove("dark");
}
-
localStorage.setItem(storageKey, theme);
}, [theme]);
diff --git a/src/components/tool-editor-ui/tool-card.tsx b/src/components/tool-editor-ui/tool-card.tsx
index e8e72bf..d44c442 100644
--- a/src/components/tool-editor-ui/tool-card.tsx
+++ b/src/components/tool-editor-ui/tool-card.tsx
@@ -9,7 +9,7 @@ import {
import { Badge } from "@/components/ui/badge";
import { Tool } from "@/registry/commandly/lib/types/commandly";
import { Button } from "@/components/ui/button";
-import { Link, useNavigate } from "@tanstack/react-router";
+import { Link } from "@tanstack/react-router";
import { Edit2Icon, Trash2Icon } from "lucide-react";
import {
HoverCard,
@@ -28,7 +28,6 @@ export function ToolCard({
onDelete?: (tool: Partial) => void;
}) {
const supportedIO = [...tool.supportedInput!, ...tool.supportedOutput!];
- const navigation = useNavigate();
const descRef = useRef(null);
const [isOverflowing, setIsOverflowing] = useState(false);
@@ -39,14 +38,6 @@ export function ToolCard({
}
}, [tool.description]);
- const handleClick = () => {
- navigation({
- to: "/tools/$toolName",
- params: { toolName: tool.name! },
- search: isLocal ? { newTool: tool.name } : {}
- });
- };
-
return (
-
+
{tool.description ? (
@@ -136,7 +127,7 @@ export function ToolCard({