Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion modules/playground/components/playground-modals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,20 @@ export const PlaygroundModals: React.FC<PlaygroundModalsProps> = ({
return (
<>
{/* AI Chat Panel */}
<ErrorBoundary name="AIChatPanel">
<ErrorBoundary
name="AIChatPanel"
fallback={({ reset }) => (
<div className="fixed bottom-4 right-4 z-50 max-w-xs rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-center shadow-lg">
<p className="mb-2 text-sm font-medium text-destructive">AI Chat crashed</p>
<button
onClick={reset}
className="text-xs underline text-muted-foreground hover:text-foreground"
>
Reload Chat
</button>
</div>
)}
>
<AIChatPanel
templateData={templateData}
saveTemplateData={saveTemplateData}
Expand Down
Loading