From afa456f044368892b73d25b70380e21605927191 Mon Sep 17 00:00:00 2001 From: ikechan8370 Date: Sat, 15 Feb 2025 23:08:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=94=99=E8=AF=AF=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E9=9D=9E=E6=96=87=E6=9C=AC=E6=B6=88=E6=81=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/bym.js | 4 ++-- utils/text.js | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/bym.js b/apps/bym.js index c066b05..aa7b56c 100644 --- a/apps/bym.js +++ b/apps/bym.js @@ -2,8 +2,8 @@ import { Config } from '../utils/config.js' import { getChatHistoryGroup } from '../utils/chat.js' import { convertFaces } from '../utils/face.js' import { customSplitRegex, filterResponseChunk } from '../utils/text.js' -import core, {roleMap} from '../model/core.js' -import {formatDate} from '../utils/common.js' +import core, { roleMap } from '../model/core.js' +import { formatDate } from '../utils/common.js' export class bym extends plugin { constructor () { diff --git a/utils/text.js b/utils/text.js index a617e1d..7216ee6 100644 --- a/utils/text.js +++ b/utils/text.js @@ -3,9 +3,12 @@ * @param msg */ export function filterResponseChunk (msg) { - if (!msg || typeof msg !== 'string') { + if (!msg) { return false } + if (typeof msg !== 'string') { + return msg + } if (!msg.trim()) { return false }