Skip to content

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/library): Prevent execution updates mixing between library agents (#9835)

Reinier van der Leer05c670eef9eb
diff --git a/autogpt_platform/frontend/src/app/library/agents/[id]/page.tsx b/autogpt_platform/frontend/src/app/library/agents/[id]/page.tsx
index a5da0f0158..f6df916a44 100644
--- a/autogpt_platform/frontend/src/app/library/agents/[id]/page.tsx
+++ b/autogpt_platform/frontend/src/app/library/agents/[id]/page.tsx
@@ -145,6 +145,8 @@ export default function AgentRunsPage(): React.ReactElement {
const detachExecUpdateHandler = api.onWebSocketMessage(
"graph_execution_event",
(data) => {
+ if (data.graph_id != agent?.graph_id) return;
+
setAgentRuns((prev) => {
const index = prev.findIndex((run) => run.id === data.id);
if (index === -1) {
@@ -163,7 +165,7 @@ export default function AgentRunsPage(): React.ReactElement {
return () => {
detachExecUpdateHandler();
};
- }, [api, selectedView.id]);
+ }, [api, agent?.graph_id, selectedView.id]);
// load selectedRun based on selectedView
useEffect(() => {