diff --git a/autogpt_platform/frontend/src/app/login/actions.ts b/autogpt_platform/frontend/src/app/login/actions.ts index b304cf8ba351..b0f4a59bf15f 100644 --- a/autogpt_platform/frontend/src/app/login/actions.ts +++ b/autogpt_platform/frontend/src/app/login/actions.ts @@ -50,6 +50,9 @@ export async function signup(values: z.infer) { const { data, error } = await supabase.auth.signUp(values); if (error) { + if (error.message.includes("P0001")) { + return "Please join our waitlist for your turn: https://agpt.co/waitlist"; + } return error.message; } diff --git a/autogpt_platform/frontend/src/components/Flow.tsx b/autogpt_platform/frontend/src/components/Flow.tsx index dc5606de1703..bbffd80192b9 100644 --- a/autogpt_platform/frontend/src/components/Flow.tsx +++ b/autogpt_platform/frontend/src/components/Flow.tsx @@ -39,7 +39,6 @@ import { IconUndo2, IconRedo2, IconSquare, - IconOutput, } from "@/components/ui/icons"; import { startTutorial } from "./tutorial"; import useAgentGraph from "@/hooks/useAgentGraph"; @@ -49,6 +48,7 @@ import { LogOut } from "lucide-react"; import RunnerUIWrapper, { RunnerUIWrapperRef, } from "@/components/RunnerUIWrapper"; +import PrimaryActionBar from "@/components/PrimaryActionButton"; // This is for the history, this is the minimum distance a block must move before it is logged // It helps to prevent spamming the history with small movements especially when pressing on a input in a block @@ -557,23 +557,6 @@ const FlowEditor: React.FC<{ icon: , onClick: handleRedo, }, - { - label: !savedAgent - ? "Please save the agent to run" - : !isRunning - ? "Run" - : "Stop", - icon: !isRunning ? : , - onClick: !isRunning - ? () => runnerUIRef.current?.runOrOpenInput() - : requestStopRun, - disabled: !savedAgent, - }, - { - label: "Runner Output", - icon: , - onClick: () => runnerUIRef.current?.openRunnerOutput(), - }, ]; return ( @@ -614,6 +597,31 @@ const FlowEditor: React.FC<{ onNameChange={setAgentName} /> + runnerUIRef.current?.openRunnerOutput()} + onClickRunAgent={() => { + if (!savedAgent) { + alert( + "Please save the agent to run, by clicking the save button in the left sidebar.", + ); + return; + } + if (!isRunning) { + runnerUIRef.current?.runOrOpenInput(); + } else { + requestStopRun(); + } + }} + isRunning={isRunning} + requestStopRun={requestStopRun} + runAgentTooltip={ + !savedAgent + ? "Please save the agent to run" + : !isRunning + ? "Run Agent" + : "Stop Agent" + } + /> void; + onClickRunAgent: () => void; + isRunning: boolean; + requestStopRun: () => void; + runAgentTooltip: string; +} + +const PrimaryActionBar: React.FC = ({ + onClickAgentOutputs, + onClickRunAgent, + isRunning, + requestStopRun, + runAgentTooltip, +}) => { + const runButtonLabel = !isRunning ? "Run" : "Stop"; + + const runButtonIcon = !isRunning ? : ; + + const runButtonOnClick = !isRunning ? onClickRunAgent : requestStopRun; + + return ( +
+
+ + + + + +

View agent outputs

+
+
+ + + + + +

{runAgentTooltip}

+
+
+
+
+ ); +}; + +export default PrimaryActionBar; diff --git a/autogpt_platform/frontend/src/components/ui/button.tsx b/autogpt_platform/frontend/src/components/ui/button.tsx index 245a21b0744c..467f58b2d8d7 100644 --- a/autogpt_platform/frontend/src/components/ui/button.tsx +++ b/autogpt_platform/frontend/src/components/ui/button.tsx @@ -25,6 +25,7 @@ const buttonVariants = cva( default: "h-9 px-4 py-2", sm: "h-8 rounded-md px-3 text-xs", lg: "h-10 rounded-md px-8", + primary: "h-14 w-44 rounded-2xl", icon: "h-9 w-9", }, },