From 8e94618c514b3c67ceeea7d2fb3c0f43ef7d22d7 Mon Sep 17 00:00:00 2001 From: Danny Liu Date: Mon, 22 Apr 2024 00:16:05 -0700 Subject: [PATCH 1/2] fix:
is not escaped in output text --- src/lib/utils/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index a24834c3..99f2a504 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -35,13 +35,12 @@ export const sanitizeResponseContent = (content: string) => { .replace(/<\|[a-z]+\|$/, '') .replace(/<$/, '') .replaceAll(/<\|[a-z]+\|>/g, ' ') - .replaceAll(//gi, '\n') .replaceAll('<', '<') .trim(); }; export const revertSanitizedResponseContent = (content: string) => { - return content.replaceAll('<', '<'); + return content.replaceAll('<', '<'); }; export const capitalizeFirstLetter = (string) => { From 40c1b49e6db6abb7a13d4172b076364e86d59a65 Mon Sep 17 00:00:00 2001 From: Danny Liu Date: Mon, 22 Apr 2024 00:17:43 -0700 Subject: [PATCH 2/2] chore: run format --- src/lib/utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index 99f2a504..04cc2207 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -40,7 +40,7 @@ export const sanitizeResponseContent = (content: string) => { }; export const revertSanitizedResponseContent = (content: string) => { - return content.replaceAll('<', '<'); + return content.replaceAll('<', '<'); }; export const capitalizeFirstLetter = (string) => {