Skip to main content
Glama
InlineFolderPicker.tsx1.17 kB
"use client" import { useConfig } from "@/src/app/config-context"; import { useTools } from "@/src/app/tools-context"; import { FolderPicker } from "@/src/components/tools/folders/FolderPicker"; import { createSuperglueClient } from "@/src/lib/client-utils"; import { Tool } from "@superglue/shared"; import { useToast } from "@/src/hooks/use-toast"; interface InlineFolderPickerProps { tool: Tool; } export function InlineFolderPicker({ tool }: InlineFolderPickerProps) { const config = useConfig(); const { refreshTools } = useTools(); const { toast } = useToast(); const handleFolderChange = async (newFolder: string | null) => { try { const client = createSuperglueClient(config.superglueEndpoint); await client.upsertWorkflow(tool.id, { ...tool, folder: newFolder }); refreshTools(); } catch (error) { toast({ title: "Error updating folder", description: error instanceof Error ? error.message : "Failed to update folder", variant: "destructive", }); refreshTools(); } }; return ( <FolderPicker value={tool.folder} onChange={handleFolderChange} /> ); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/superglue-ai/superglue'

If you have feedback or need assistance with the MCP directory API, please join our Discord server