mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-30 03:00:41 -04:00
fix(frontend/builder): wrap BuilderChatPanel in ErrorBoundary
Prevents a runtime error in action parsing or message rendering from crashing the entire build page. Uses a null fallback so the rest of the editor remains usable if the chat panel fails. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useGetV1GetSpecificGraph } from "@/app/api/__generated__/endpoints/graphs/graphs";
|
||||
import { okData } from "@/app/api/helpers";
|
||||
import { ErrorBoundary } from "@/components/molecules/ErrorBoundary/ErrorBoundary";
|
||||
import { FloatingReviewsPanel } from "@/components/organisms/FloatingReviewsPanel/FloatingReviewsPanel";
|
||||
import { BuilderChatPanel } from "../../BuilderChatPanel/BuilderChatPanel";
|
||||
import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";
|
||||
@@ -139,10 +140,12 @@ export const Flow = () => {
|
||||
graphId={flowID || undefined}
|
||||
/>
|
||||
{isBuilderChatEnabled && (
|
||||
<BuilderChatPanel
|
||||
isGraphLoaded={isInitialLoadComplete}
|
||||
onGraphEdited={() => void refetchGraph()}
|
||||
/>
|
||||
<ErrorBoundary context="BuilderChatPanel" fallback={null}>
|
||||
<BuilderChatPanel
|
||||
isGraphLoaded={isInitialLoadComplete}
|
||||
onGraphEdited={() => void refetchGraph()}
|
||||
/>
|
||||
</ErrorBoundary>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user