From 7828bd6f2e610e4f78250cc851a2c67c6c6894fc Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Sun, 2 Jun 2024 16:54:50 +0530 Subject: [PATCH] Hide command popup & focus on chatInput on selecting command in web app Style command popup cursor and add highlight to indicate using slash command --- src/khoj/interface/web/chat.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/khoj/interface/web/chat.html b/src/khoj/interface/web/chat.html index 1679f2be..826355a6 100644 --- a/src/khoj/interface/web/chat.html +++ b/src/khoj/interface/web/chat.html @@ -724,8 +724,13 @@ To get started, just start typing below. You can also type / to see a list of co } function fillCommandInPrompt(command) { + let chatTooltip = document.getElementById("chat-tooltip"); + chatTooltip.style.display = "none"; + let chatInput = document.getElementById("chat-input"); - chatInput.value = "/" + command; + chatInput.value = "/" + command + " "; + chatInput.classList.add("option-enabled"); + chatInput.focus(); } function onChatInput() { @@ -2569,6 +2574,9 @@ To get started, just start typing below. You can also type / to see a list of co text-align: left; font-size: medium; } + div#chat-tooltip:hover { + cursor: pointer; + } svg.new-convo-button { width: 20px;