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
1065 description: error instanceof Error ? error.message : "An error occurred.",1065 description: error instanceof Error ? error.message : "An error occurred.",
1066 }),1066 }),
1067 );1067 );
1068 handleOpenInFilePreview();
1068 } catch (cause) {1069 } catch (cause) {
1069 reportMarkdownActionFailure(1070 reportMarkdownActionFailure(
1070 { operation: "open-file-in-browser", target: targetPath },1071 { operation: "open-file-in-browser", target: targetPath },
@@ -1077,9 +1078,10 @@ const MarkdownFileLink = memo(function MarkdownFileLink({ · 6 unmodified lines
1077 description: cause instanceof Error ? cause.message : "An error occurred.",1078 description: cause instanceof Error ? cause.message : "An error occurred.",
1078 }),1079 }),
1079 );1080 );
1081 handleOpenInFilePreview();
1080 }1082 }
1081 })();1083 })();
1082 }, [onOpenInBrowser, targetPath]);1084 }, [handleOpenInFilePreview, onOpenInBrowser, targetPath]);
1083 1085
1084 const handleCopy = useCallback(1086 const handleCopy = useCallback(
1085 (value: string, title: string) => {1087 (value: string, title: string) => {