diff --git a/ui/admin/app/components/chat/Chat.tsx b/ui/admin/app/components/chat/Chat.tsx index 3d00ca85..07d190c6 100644 --- a/ui/admin/app/components/chat/Chat.tsx +++ b/ui/admin/app/components/chat/Chat.tsx @@ -58,6 +58,9 @@ export function Chat({ className }: ChatProps) { className={cn({ "w-full": threadId, })} + popoverContentProps={{ + sideOffset: !threadId ? -150 : undefined, + }} loading={isInvoking || isRunning} disabled={isInvoking || isRunning} > diff --git a/ui/admin/app/components/chat/RunWorkflow.tsx b/ui/admin/app/components/chat/RunWorkflow.tsx index 2736df60..f27a668b 100644 --- a/ui/admin/app/components/chat/RunWorkflow.tsx +++ b/ui/admin/app/components/chat/RunWorkflow.tsx @@ -1,4 +1,4 @@ -import { useState } from "react"; +import { ComponentProps, useState } from "react"; import useSWR from "swr"; import { WorkflowService } from "~/lib/service/api/workflowService"; @@ -14,6 +14,7 @@ import { type RunWorkflowProps = { onSubmit: (params?: Record) => void; workflowId: string; + popoverContentProps?: ComponentProps; }; export function RunWorkflow({ @@ -49,12 +50,16 @@ export function RunWorkflow({ {...props} disabled={props.disabled || open || isLoading} loading={props.loading || isLoading} + onClick={() => setOpen((prev) => !prev)} > Run Workflow - + {