diff --git a/src/ts/process/index.svelte.ts b/src/ts/process/index.svelte.ts index 4694284d..b2783cf0 100644 --- a/src/ts/process/index.svelte.ts +++ b/src/ts/process/index.svelte.ts @@ -753,7 +753,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 '' })