summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-05-19 13:32:43 +0800
committerGitHub <noreply@github.com>2024-05-19 13:32:43 +0800
commit7f21854b9aea22af0c609d6abe4ae07e9c472e25 (patch)
treead95746420029a32516a0b6a5409f69e09d0de7b /assets
parenteaf36cdfb5137dd5fa522b43506c47859db3c1aa (diff)
downloadaichat-7f21854b9aea22af0c609d6abe4ae07e9c472e25.tar.gz
fix: webui issue with image (#523)
Diffstat (limited to 'assets')
-rw-r--r--assets/arena.html3
-rw-r--r--assets/playground.html6
2 files changed, 7 insertions, 2 deletions
diff --git a/assets/arena.html b/assets/arena.html
index 07a0cb6..b50ee52 100644
--- a/assets/arena.html
+++ b/assets/arena.html
@@ -101,6 +101,7 @@
.chat-message {
display: flex;
padding: 0.7rem;
+ margin-bottom: 0.7rem;
}
.chat-avatar svg {
@@ -170,7 +171,7 @@
.message-toolbox {
display: flex;
position: absolute;
- bottom: -1.25rem;
+ bottom: -1.4rem;
}
.copy-message-btn,
diff --git a/assets/playground.html b/assets/playground.html
index 420c679..d8c33f7 100644
--- a/assets/playground.html
+++ b/assets/playground.html
@@ -178,6 +178,7 @@
.chat-message {
display: flex;
padding: 0.7rem;
+ margin-bottom: 0.7rem;
}
.chat-avatar svg {
@@ -247,7 +248,7 @@
.message-toolbox {
display: flex;
position: absolute;
- bottom: -1.25rem;
+ bottom: -1.4rem;
}
.copy-message-btn,
@@ -1193,6 +1194,9 @@
function estimateTokenLength(input) {
let tokenLength = 0;
+ if (Array.isArray(input)) {
+ input = input.map(v => v.text || "").join("");
+ }
for (let i = 0; i < input.length; i++) {
const charCode = input.charCodeAt(i);