From 1b85958bcc06ffd6efcd3b41cee4e12984af3db8 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Mon, 28 Aug 2023 19:18:10 -0700 Subject: [PATCH] trim chat input start --- src/khoj/interface/web/chat.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/khoj/interface/web/chat.html b/src/khoj/interface/web/chat.html index 659d410a..2230e901 100644 --- a/src/khoj/interface/web/chat.html +++ b/src/khoj/interface/web/chat.html @@ -168,6 +168,8 @@ function onChatInput() { let chatInput = document.getElementById("chat-input"); + chatInput.value = chatInput.value.trimStart(); + if (chatInput.value.startsWith("/") && chatInput.value.split(" ").length === 1) { let chatTooltip = document.getElementById("chat-tooltip"); chatTooltip.style.display = "block";