From 88c6232e45c0c6f90e845950e25c9447887cf0c1 Mon Sep 17 00:00:00 2001 From: shrimbly Date: Fri, 9 Jan 2026 21:07:50 +1300 Subject: [PATCH] feat(04-01): add provider icon buttons to FloatingActionBar - Add modelSearchOpen/modelSearchProvider state to workflowStore - Add setModelSearchOpen action to toggle dialog with provider filter - Add ProviderIconButton component with Replicate (R) and fal.ai (lightning) icons - Replicate icon only visible when API key is configured - fal.ai icon always visible (works without key but rate limited) --- src/components/FloatingActionBar.tsx | 43 +++++++++++++++++++++++++++- src/store/workflowStore.ts | 19 ++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/src/components/FloatingActionBar.tsx b/src/components/FloatingActionBar.tsx index 5371dcd7..f51d1c34 100644 --- a/src/components/FloatingActionBar.tsx +++ b/src/components/FloatingActionBar.tsx @@ -2,7 +2,7 @@ import { useRef, useState, useEffect, useMemo } from "react"; import { useWorkflowStore } from "@/store/workflowStore"; -import { NodeType } from "@/types"; +import { NodeType, ProviderType } from "@/types"; import { useReactFlow } from "@xyflow/react"; // Get the center of the React Flow pane in screen coordinates @@ -141,6 +141,28 @@ function GenerateComboButton() { ); } +function ProviderIconButton({ provider, onClick }: { provider: ProviderType; onClick: () => void }) { + return ( + + ); +} + export function FloatingActionBar() { const { nodes, @@ -151,6 +173,9 @@ export function FloatingActionBar() { validateWorkflow, edgeStyle, setEdgeStyle, + providerSettings, + setModelSearchOpen, + modelSearchOpen, } = useWorkflowStore(); const [runMenuOpen, setRunMenuOpen] = useState(false); const runMenuRef = useRef(null); @@ -215,6 +240,22 @@ export function FloatingActionBar() { + {/* Provider model browser icons */} +
+ + {/* Replicate icon - only show if API key is configured */} + {providerSettings.providers.replicate?.apiKey && ( + setModelSearchOpen(true, "replicate")} + /> + )} + {/* fal.ai icon - always show (works without key but rate limited) */} + setModelSearchOpen(true, "fal")} + /> +