import { Box, Chip, LinearProgress, Typography } from '@mui/material'; import React from 'react'; import { useShallow } from 'zustand/react/shallow'; import { useAgentChatStore } from '../../../Agent/store/agentChatStore'; interface PreviewProgressBarProps { /** * Whether to show the progress bar */ show: boolean; } /** * Progress bar component for preview generation * Shows real-time progress and current processing step */ export const PreviewProgressBar: React.FC = ({ show }) => { const { previewProgress, previewCurrentStep, previewCurrentPlugin, previewLoading, } = useAgentChatStore( useShallow((state) => ({ previewProgress: state.previewProgress, previewCurrentStep: state.previewCurrentStep, previewCurrentPlugin: state.previewCurrentPlugin, previewLoading: state.previewLoading, })), ); if (!show || !previewLoading) { return null; } const progressPercentage = Math.round(previewProgress * 100); return ( {previewCurrentStep} {previewCurrentPlugin && ( )} {progressPercentage}% ⚡ Live preview - this is not the final version and is still loading ); };