+
+ .overlay-buttons': { opacity: 1 },
+
+ ...props.sx,
+ }}
+ >
+
+ {/* External Image */}
+
+
+ {/* Information */}
+ {!!alt && infoOpen && (
+
+ {alt}
+
+ )}
+
+ {/* (overlay) Image Buttons */}
+
+ {!!props.onRunAgain && (
+
+
+
+
+
+ )}
+
+ {!!alt && (
+
+ setInfoOpen(open => !open)}>
+
+
+
+ )}
+
+
+
+
+
+
+
+
+
+ {/* Dalle Warning notice */}
+ {isTempDalleUrl && showAlert && (
+ }
+ endDecorator={
+ setShowAlert(on => !on)} sx={{ my: -0.5 }}>
+
+
}
sx={{
- maxWidth: { sm: '90vw', md: '70vw' },
- boxShadow: 'md',
+ mx: 0.5,
+ ...props.sx,
}}
>
-
-
- ) : (
-
+
+ Please Save Locally · OpenAI will delete this image link from their servers one hour after creation.
+
+
)}
- {/* Image Buttons */}
-
- {!!props.onRunAgain && (
-
-
-
-
-
- )}
-
-
-
-
-
-
- ;
- });
+
+ );
};
\ No newline at end of file
diff --git a/src/modules/blocks/code/RenderCode.tsx b/src/modules/blocks/code/RenderCode.tsx
index 820ad3837..ba5867c3a 100644
--- a/src/modules/blocks/code/RenderCode.tsx
+++ b/src/modules/blocks/code/RenderCode.tsx
@@ -19,8 +19,17 @@ import { ButtonStackBlitz, isStackBlitzSupported } from './ButtonStackBlitz';
import { heuristicIsHtml, IFrameComponent } from '../RenderHtml';
import { patchSvgString, RenderCodeMermaid } from './RenderCodeMermaid';
+export function getPlantUmlServerUrl(): string {
+ // set at nextjs build time
+ return process.env.NEXT_PUBLIC_PLANTUML_SERVER_URL || 'https://www.plantuml.com/plantuml/svg/';
+}
async function fetchPlantUmlSvg(plantUmlCode: string): Promise