summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-08-19 16:13:44 +0800
committerGitHub <noreply@github.com>2024-08-19 16:13:44 +0800
commitc0eae1c55c0d48ed1c6f9f6cb2d8990deb163b37 (patch)
treeba725d416256a80f3d791e03ff7e7193ee086a5b /assets
parent7eefb96b0c78a8aa77b62d4b127343f6f38a7618 (diff)
downloadaichat-c0eae1c55c0d48ed1c6f9f6cb2d8990deb163b37.tar.gz
refactor: webui render error (#797)
Diffstat (limited to 'assets')
-rw-r--r--assets/arena.html3
-rw-r--r--assets/playground.html3
2 files changed, 4 insertions, 2 deletions
diff --git a/assets/arena.html b/assets/arena.html
index 90cc6af..80e1397 100644
--- a/assets/arena.html
+++ b/assets/arena.html
@@ -121,6 +121,7 @@
.chat-message-content .error {
color: red;
+ background: none;
}
.chat-message-content .message-text {
@@ -1028,7 +1029,7 @@
}
function renderMarkdown(text, error = '') {
- return marked.marked(text) + (error ? `<p class="error">${error}</p>` : '');
+ return marked.marked(text) + (error ? `<pre class="error">${error}</pre>` : '');
}
function calculateOffsets(pieces) {
diff --git a/assets/playground.html b/assets/playground.html
index 011d632..1c1c294 100644
--- a/assets/playground.html
+++ b/assets/playground.html
@@ -198,6 +198,7 @@
.chat-message-content .error {
color: red;
+ background: none;
}
.chat-message-content .message-text {
@@ -1251,7 +1252,7 @@
}
function renderMarkdown(text, error = '') {
- return marked.marked(text) + (error ? `<p class="error">${error}</p>` : '');
+ return marked.marked(text) + (error ? `<pre class="error">${error}</pre>` : '');
}
</script>
</body>