From 5ec2a8f1a1dc2d42e24678b723ad5b54b71e6546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B0=D1=80=D0=B8=D0=B5=D0=B2=20=D0=AD=D0=B4=D1=83?= =?UTF-8?q?=D0=B0=D1=80=D0=B4?= Date: Wed, 8 Nov 2023 14:24:55 +0300 Subject: [PATCH] Fix input 2 --- src/lib/Chat.svelte | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/lib/Chat.svelte b/src/lib/Chat.svelte index 35a1ee0c..8520af13 100644 --- a/src/lib/Chat.svelte +++ b/src/lib/Chat.svelte @@ -27,6 +27,7 @@ faPaperPlane, faGear, faPenToSquare, + faMicrophone, faLightbulb, faCommentSlash, faCircleCheck @@ -343,6 +344,18 @@ }) } + const recordToggle = () => { + ttsStop() + if (chatRequest.updating) return + // Check if already recording - if so, stop - else start + if (recording) { + recognition?.stop() + recording = false + } else { + recognition?.start() + } + } + {#if chat} @@ -400,13 +413,14 @@ } }} on:input={e => autoGrowInputOnEvent(e)} - bind:this={input}> + bind:this={input} + />

- +