diff --git a/src/ts/process/index.svelte.ts b/src/ts/process/index.svelte.ts index f9c108c7..25e39f28 100644 --- a/src/ts/process/index.svelte.ts +++ b/src/ts/process/index.svelte.ts @@ -755,7 +755,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{ } } let thoughts:string[] = [] - formatedChat = formatedChat.replace(/(.+?)<\/Thoughts>/gm, (match, p1) => { + formatedChat = formatedChat.replace(/([\s\S]+?)<\/Thoughts>/g, (match, p1) => { thoughts.push(p1) return '' })