From 636c06ffdd5a094c82209a32a886e947707ccb2d Mon Sep 17 00:00:00 2001
From: Cohee <18619528+Cohee1207@users.noreply.github.com>
Date: Sun, 27 Aug 2023 21:28:13 +0300
Subject: [PATCH] Autosize prompt manager boxes
---
public/index.html | 26 +++++++++++++-------------
public/scripts/openai.js | 5 +++++
2 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/public/index.html b/public/index.html
index ea91c7adc..2b4655856 100644
--- a/public/index.html
+++ b/public/index.html
@@ -578,7 +578,7 @@
-
+
@@ -1440,24 +1440,24 @@
Assistant Prefill
-
+
@@ -1478,7 +1478,7 @@
Prompt that is used for Impersonation function
-
+
@@ -1493,7 +1493,7 @@
{0} to mark a place where the content is inserted.
-
+
@@ -1508,7 +1508,7 @@
Prompt that is used when the NSFW toggle is OFF
-
+
@@ -1525,7 +1525,7 @@
-
+
@@ -1541,7 +1541,7 @@
-
+
@@ -1557,7 +1557,7 @@
-
+
@@ -1573,7 +1573,7 @@
-
+
@@ -1586,7 +1586,7 @@
-
+
diff --git a/public/scripts/openai.js b/public/scripts/openai.js
index 589615035..3986d2b77 100644
--- a/public/scripts/openai.js
+++ b/public/scripts/openai.js
@@ -50,6 +50,7 @@ import {
download,
getFileText, getSortableDelay,
parseJsonFile,
+ resetScrollHeight,
stringFormat,
} from "./utils.js";
import { countTokensOpenAI } from "./tokenizers.js";
@@ -3141,6 +3142,10 @@ $(document).ready(async function () {
saveSettingsDebounced();
});
+ $(document).on('input', '#openai_settings .autoSetHeight', function () {
+ resetScrollHeight($(this));
+ });
+
$("#api_button_openai").on("click", onConnectButtonClick);
$("#openai_reverse_proxy").on("input", onReverseProxyInput);
$("#model_openai_select").on("change", onModelChange);