UI: fix instruct style background for multiline inputs

This commit is contained in:
oobabooga 2024-02-17 20:08:11 -08:00
parent 904867a139
commit 36c29084bb

View file

@ -390,7 +390,12 @@ function updateCssProperties() {
if (chatContainer.clientHeight > 0) { if (chatContainer.clientHeight > 0) {
// Calculate new chat height and adjust CSS properties // Calculate new chat height and adjust CSS properties
const newChatHeight = `${chatContainer.clientHeight - chatInputHeight + 40}px`; var numericHeight = chatContainer.parentNode.clientHeight - chatInputHeight + 40 - 100;
if (document.getElementById("chat-tab").style.paddingBottom != "") {
numericHeight += 20;
}
const newChatHeight = `${numericHeight}px`;
document.documentElement.style.setProperty("--chat-height", newChatHeight); document.documentElement.style.setProperty("--chat-height", newChatHeight);
document.documentElement.style.setProperty("--input-delta", `${chatInputHeight - 40}px`); document.documentElement.style.setProperty("--input-delta", `${chatInputHeight - 40}px`);