limit prompt template

This commit is contained in:
archer
2023-09-05 18:15:42 +08:00
parent 9bf5a3ec76
commit fa3f3e6264
9 changed files with 31 additions and 24 deletions

View File

@@ -80,7 +80,7 @@ const MermaidBlock = ({ code }: { code: string }) => {
ctx.fillRect(0, 0, w, h);
const img = new Image();
img.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(ref.current.innerHTML)}`;
img.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(ref.current?.innerHTML)}`;
img.onload = () => {
ctx.drawImage(img, 0, 0, w, h);