refac: enhanced response content sanitisation

'<' and '>' can be correctly displayed now
This commit is contained in:
Timothy J. Baek
2024-08-15 00:08:15 +02:00
parent c8badfe21f
commit 5a6ece9513
7 changed files with 39 additions and 43 deletions
@@ -18,8 +18,7 @@
approximateToHumanReadable,
extractSentences,
replaceTokens,
revertSanitizedResponseContent,
sanitizeResponseContent
processResponseContent
} from '$lib/utils';
import { WEBUI_BASE_URL } from '$lib/constants';
@@ -88,7 +87,7 @@
$: (async () => {
if (message?.content) {
tokens = marked.lexer(
replaceTokens(sanitizeResponseContent(message?.content), model?.name, $user?.name)
replaceTokens(processResponseContent(message?.content), model?.name, $user?.name)
);
}
})();