From 898b65a65338a2dcfed183785f4d0d1c200874b5 Mon Sep 17 00:00:00 2001 From: Silentoplayz <50341825+Silentoplayz@users.noreply.github.com> Date: Wed, 18 Jun 2025 00:12:11 -0400 Subject: [PATCH] fix: sanatizeResponseContent for stop token display --- src/lib/utils/index.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index 30f37e68d..a3d02f55c 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -83,9 +83,9 @@ export const sanitizeResponseContent = (content: string) => { .replace(/<\|[a-z]*$/, '') .replace(/<\|[a-z]+\|$/, '') .replace(/<$/, '') - .replaceAll(/<\|[a-z]+\|>/g, ' ') .replaceAll('<', '<') .replaceAll('>', '>') + .replaceAll(/<\|[a-z]+\|>/g, ' ') .trim(); }; @@ -361,9 +361,9 @@ export const generateInitialsImage = (name) => { const initials = sanitizedName.length > 0 ? sanitizedName[0] + - (sanitizedName.split(' ').length > 1 - ? sanitizedName[sanitizedName.lastIndexOf(' ') + 1] - : '') + (sanitizedName.split(' ').length > 1 + ? sanitizedName[sanitizedName.lastIndexOf(' ') + 1] + : '') : ''; ctx.fillText(initials.toUpperCase(), canvas.width / 2, canvas.height / 2); @@ -514,10 +514,10 @@ export const compareVersion = (latest, current) => { return current === '0.0.0' ? false : current.localeCompare(latest, undefined, { - numeric: true, - sensitivity: 'case', - caseFirst: 'upper' - }) < 0; + numeric: true, + sensitivity: 'case', + caseFirst: 'upper' + }) < 0; }; export const extractCurlyBraceWords = (text) => {