From dc293f4f918054f63a73c096be715db33fca535b Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Sat, 19 Apr 2025 14:52:13 +0800 Subject: [PATCH] =?UTF-8?q?remove=20the=20tailing=20=E3=80=82for=20text=20?= =?UTF-8?q?generated=20by=20ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/flow/READ_NO_REPLY_AUTO_REMINDER/boss-operation.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ui/src/main/flow/READ_NO_REPLY_AUTO_REMINDER/boss-operation.ts b/packages/ui/src/main/flow/READ_NO_REPLY_AUTO_REMINDER/boss-operation.ts index 3781895..0c76eb8 100644 --- a/packages/ui/src/main/flow/READ_NO_REPLY_AUTO_REMINDER/boss-operation.ts +++ b/packages/ui/src/main/flow/READ_NO_REPLY_AUTO_REMINDER/boss-operation.ts @@ -204,6 +204,7 @@ export const sendGptContent = async (page: Page, chatRecords) => { try { const rawMarkdownText = res?.message?.content textToSend = JSON.parse(rawMarkdownText.replace(/^```json/m, '').replace(/```$/m, ''))?.response + textToSend = textToSend?.replace(/。$/, '') if (!textToSend) { throw new Error(`empty content. ${err?.message} ${res?.message?.content}`) }