From 63d297756af114813e0182dca5997295093f2a31 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 11 Oct 2024 00:10:00 -0700 Subject: [PATCH] enh: mermaid copy content button --- src/lib/components/chat/Artifacts.svelte | 2 +- .../components/chat/Messages/CodeBlock.svelte | 1 + src/lib/components/common/SVGPanZoom.svelte | 28 +++++++++++++++++-- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/Artifacts.svelte b/src/lib/components/chat/Artifacts.svelte index d07550ed8..9bb5342e7 100644 --- a/src/lib/components/chat/Artifacts.svelte +++ b/src/lib/components/chat/Artifacts.svelte @@ -191,7 +191,7 @@ showArtifacts.set(false); }} > - + diff --git a/src/lib/components/chat/Messages/CodeBlock.svelte b/src/lib/components/chat/Messages/CodeBlock.svelte index a714718f3..ef17c493a 100644 --- a/src/lib/components/chat/Messages/CodeBlock.svelte +++ b/src/lib/components/chat/Messages/CodeBlock.svelte @@ -302,6 +302,7 @@ __builtins__.input = input`); {:else}
{code}
diff --git a/src/lib/components/common/SVGPanZoom.svelte b/src/lib/components/common/SVGPanZoom.svelte index 549fd2500..e576ffb06 100644 --- a/src/lib/components/common/SVGPanZoom.svelte +++ b/src/lib/components/common/SVGPanZoom.svelte @@ -1,11 +1,19 @@ -
+
{@html svg}
+ + {#if content} +
+ + + +
+ {/if}