History

Add markdown preview failure fallback

Wout Stiens committed 4 months ago

Commit 36074741 parent 3be757f1 file · +3 −1Browse files

Unified · Split

apps/web/src/components/ChatMarkdown.tsx+3−1
@@ -1065,6 +1065,7 @@ const MarkdownFileLink = memo(function MarkdownFileLink({ · 1064 unmodified lines
10651065 description: error instanceof Error ? error.message : "An error occurred.",
10661066 }),
10671067 );
1068+ handleOpenInFilePreview();
10681069 } catch (cause) {
10691070 reportMarkdownActionFailure(
10701071 { operation: "open-file-in-browser", target: targetPath },
@@ -1077,9 +1078,10 @@ const MarkdownFileLink = memo(function MarkdownFileLink({ · 6 unmodified lines
10771078 description: cause instanceof Error ? cause.message : "An error occurred.",
10781079 }),
10791080 );
1081+ handleOpenInFilePreview();
10801082 }
10811083 })();
1082− }, [onOpenInBrowser, targetPath]);
1084+ }, [handleOpenInFilePreview, onOpenInBrowser, targetPath]);
10831085
10841086 const handleCopy = useCallback(
10851087 (value: string, title: string) => {