From aa1967f48a3e858c23060ea5822d2328ff1cc966 Mon Sep 17 00:00:00 2001 From: Deepak Seth Date: Sun, 17 Dec 2023 16:33:25 -0800 Subject: [PATCH] ui: Allow rephrasing last prompt --- examples/server/public/index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples/server/public/index.html b/examples/server/public/index.html index 3ccdbcc73..e18e746b4 100644 --- a/examples/server/public/index.html +++ b/examples/server/public/index.html @@ -666,6 +666,16 @@ } } + const rephraseChat = (e) => { + e.preventDefault(); + const _transcript = session.value.transcript; + _transcript.pop(); + const _chatMsg = _transcript.pop(); + transcriptUpdate(_transcript); + if (typeof (_chatMsg[1]) === 'string') + message.value = _chatMsg[1]; + } + return html`
@@ -688,6 +698,7 @@ +
`