diff --git a/apps/rowboat/app/projects/[projectId]/copilot/components/actions.tsx b/apps/rowboat/app/projects/[projectId]/copilot/components/actions.tsx index e67ca589..94f8126f 100644 --- a/apps/rowboat/app/projects/[projectId]/copilot/components/actions.tsx +++ b/apps/rowboat/app/projects/[projectId]/copilot/components/actions.tsx @@ -8,6 +8,7 @@ import { PreviewModalProvider, usePreviewModal } from '../../workflow/preview-mo import { getAppliedChangeKey } from "../app"; import { AlertTriangleIcon, CheckCheckIcon, CheckIcon, ChevronsDownIcon, ChevronsUpIcon, EyeIcon, PencilIcon, PlusIcon } from "lucide-react"; import { Spinner } from "@heroui/react"; +import { PictureImg } from "@/components/ui/picture-img"; const ActionContext = createContext<{ msgIndex: number; @@ -158,6 +159,33 @@ export function Action({ ); } + // Determine composio toolkit logo for tools + const toolkitLogo = (() => { + if (action.config_type !== 'tool') return undefined; + const getLogo = (o: any): string | undefined => { + return ( + o?.composioData?.logo || + o?.composioData?.logoUrl || + o?.composio?.logo || + o?.toolkit?.logo || + o?.composio_tool?.toolkit?.logo || + o?.logo || + undefined + ); + }; + // Try various shapes the action might use + const a: any = action as any; + return ( + getLogo(a.config_changes) || + getLogo(a) || + getLogo(a.config_changes?.tool) || + getLogo(a.config_changes?.composio_tool) || + getLogo(a.tool) || + (workflow.tools.find(t => t.name === action.name) as any)?.composioData?.logo || + undefined + ); + })(); + return