Merge branch 'develop' into crawl-search

This commit is contained in:
Rohit
2026-01-04 18:21:47 +05:30
committed by GitHub
17 changed files with 462 additions and 53 deletions

View File

@@ -30,9 +30,14 @@ interface RunContentProps {
interpretationInProgress: boolean,
logEndRef: React.RefObject<HTMLDivElement>,
abortRunHandler: () => void,
workflowProgress: {
current: number;
total: number;
percentage: number;
} | null,
}
export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRef, abortRunHandler }: RunContentProps) => {
export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRef, abortRunHandler, workflowProgress }: RunContentProps) => {
const { t } = useTranslation();
const { darkMode } = useThemeMode();
const [tab, setTab] = React.useState<string>('output');
@@ -73,6 +78,15 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe
setTab(tab);
}, [interpretationInProgress]);
const getProgressMessage = (percentage: number): string => {
if (percentage === 0) return 'Initializing workflow...';
if (percentage < 25) return 'Starting execution...';
if (percentage < 50) return 'Processing actions...';
if (percentage < 75) return 'Extracting data...';
if (percentage < 100) return 'Finalizing results...';
return 'Completing...';
};
useEffect(() => {
setMarkdownContent('');
setHtmlContent('');
@@ -925,7 +939,20 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe
{row.status === 'running' || row.status === 'queued' ? (
<>
<Box sx={{ display: 'flex', alignItems: 'center', mb: 2 }}>
<CircularProgress size={22} sx={{ marginRight: '10px' }} />
{workflowProgress ? (
<>
<CircularProgress
size={22}
sx={{ marginRight: '10px' }}
/>
{getProgressMessage(workflowProgress.percentage)}
</>
) : (
<>
<CircularProgress size={22} sx={{ marginRight: '10px' }} />
{t('run_content.loading')}
</>
)}
{t('run_content.loading')}
</Box>
<Button color="error" onClick={abortRunHandler} sx={{ mt: 1 }}>