Merge pull request #881 from getmaxun/preview-fix

fix: output preview for capture text action
This commit is contained in:
Karishma Shukla
2025-11-12 21:56:34 +05:30
committed by GitHub

View File

@@ -332,6 +332,8 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
shouldOpenDrawer = true;
}
lastListDataLength.current = captureListData.length;
} else if (hasScrapeListAction && captureListData.length === 0) {
lastListDataLength.current = 0;
}
if (hasScrapeSchemaAction && captureTextData.length > 0 && !getText) {
@@ -341,6 +343,8 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
shouldOpenDrawer = true;
}
lastTextDataLength.current = captureTextData.length;
} else if (hasScrapeSchemaAction && captureTextData.length === 0) {
lastTextDataLength.current = 0;
}
if (hasScreenshotAction && screenshotData.length > 0) {
@@ -350,6 +354,8 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
shouldOpenDrawer = true;
}
lastScreenshotDataLength.current = screenshotData.length;
} else if (hasScreenshotAction && screenshotData.length === 0) {
lastScreenshotDataLength.current = 0;
}
const getLatestCaptureType = () => {
@@ -492,7 +498,7 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
{t('interpretation_log.titles.output_preview')}
</Typography>
{!(hasScrapeListAction || hasScrapeSchemaAction || hasScreenshotAction) && (
{!(hasScrapeListAction || hasScrapeSchemaAction || hasScreenshotAction) && !showPreviewData && availableTabs.length === 0 && (
<Grid container justifyContent="center" alignItems="center" style={{ height: '100%' }}>
<Grid item>
<Typography variant="h6" gutterBottom align="left">