refactor: webui render error (#797)

This commit is contained in:
sigoden 2024-08-19 16:13:44 +08:00 committed by GitHub
parent 7eefb96b0c
commit c0eae1c55c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -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) {

View File

@ -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>