Fix auto resizing chat input box when transcribed text added

This commit is contained in:
Debanjum Singh Solanky
2024-01-19 20:05:29 +05:30
parent 07ca137bdf
commit 8a488b9e39
4 changed files with 8 additions and 4 deletions

View File

@@ -453,7 +453,8 @@ export class KhojChatModal extends Modal {
// Parse response from Khoj backend
if (response.status === 200) {
console.log(response);
chatInput.value += response.json.text;
chatInput.value += response.json.text.trimStart();
this.autoResize();
} else if (response.status === 501) {
throw new Error("⛔️ Configure speech-to-text model on server.");
} else if (response.status === 422) {

View File

@@ -235,6 +235,7 @@ img {
grid-row-gap: 10px;
background: var(--background-primary);
margin: 0 0 0 -8px;
align-items: center;
}
#khoj-chat-input.option:hover {
box-shadow: 0 0 11px var(--background-modifier-box-shadow);