Skip to content

Commit

Permalink
fix: plaintext color based on theme
Browse files Browse the repository at this point in the history
  • Loading branch information
pejuko committed Feb 25, 2024
1 parent 6cbbce5 commit d9a1576
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ Eval tokens: {{ response.statistics.eval_count }}</pre>
}
function plaintextToHtml(content) {
return '<pre style="background: transparent; white-space: break-spaces">' + encodeHTMLEntities(content) + '</pre>';
const color = theme.global.name.value === 'dark' ? 'white' : 'black';
return `<pre style="background: transparent; color: ${color}; white-space: break-spaces">` + encodeHTMLEntities(content) + '</pre>';
}
function sanitizeHtml(content) {
Expand Down

0 comments on commit d9a1576

Please sign in to comment.