From 8f3d1ba8a00cebadb566d4bdb2328bd09c3fbfbc Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Sat, 1 Apr 2023 04:15:12 -0400 Subject: [PATCH] When a user hits CTRL+ENTER send input (#121) * When a user hits CTRL+ENTER send input * Fixing Input and Send Button Overlay on Mobile * add a small margin at the bottom --------- Co-authored-by: raven Co-authored-by: Nathan Sarrazin --- web/src/routes/chat/[id]/+page.svelte | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/web/src/routes/chat/[id]/+page.svelte b/web/src/routes/chat/[id]/+page.svelte index 6e3124f..67425cd 100644 --- a/web/src/routes/chat/[id]/+page.svelte +++ b/web/src/routes/chat/[id]/+page.svelte @@ -48,15 +48,23 @@ }; } } + + function handleKeyDown(event) { + if (event.key === "Enter" && event.ctrlKey) { + askQuestion(); + } + } -
+

Chat with {data.props.parameters.model}

Started on {startDate.toLocaleString("en-US")}

- -
+
{#each questions as question}
@@ -89,13 +97,12 @@ {/each}
-