AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(frontend): Fix `Run`/`Stop` button on Builder page refresh (#9503)
Krzysztof Czerwinski70d095ba9852
diff --git a/autogpt_platform/frontend/src/hooks/useAgentGraph.tsx b/autogpt_platform/frontend/src/hooks/useAgentGraph.tsxindex 0a97caac60..9a589bfaf0 100644--- a/autogpt_platform/frontend/src/hooks/useAgentGraph.tsx+++ b/autogpt_platform/frontend/src/hooks/useAgentGraph.tsx@@ -610,6 +610,16 @@ export default function useAgentGraph(flowID,flowExecutionID,);+ if (+ (execution.status === "QUEUED" || execution.status === "RUNNING") &&+ saveRunRequest.request === "none"+ ) {+ setSaveRunRequest({+ request: "run",+ state: "running",+ activeExecutionID: flowExecutionID,+ });+ }setUpdateQueue((prev) => [...prev, ...execution.node_executions]);// Track execution until completeddiff --git a/autogpt_platform/frontend/src/lib/autogpt-server-api/client.ts b/autogpt_platform/frontend/src/lib/autogpt-server-api/client.tsindex e638b41a15..765576c750 100644--- a/autogpt_platform/frontend/src/lib/autogpt-server-api/client.ts+++ b/autogpt_platform/frontend/src/lib/autogpt-server-api/client.ts@@ -41,7 +41,6 @@ import {} from "./types";import { createBrowserClient } from "@supabase/ssr";import getServerSupabase from "../supabase/getServerSupabase";-import { filter } from "../../../test-runner-jest.config";const isClient = typeof window !== "undefined";