Skip to content

Commit

Permalink
Fix thoughts extraction regex for multiline content handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo26fhmC5M committed Dec 21, 2024
1 parent bd7b58a commit 6d182a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ts/process/index.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{
}
}
let thoughts:string[] = []
formatedChat = formatedChat.replace(/<Thoughts>(.+?)<\/Thoughts>/gm, (match, p1) => {
formatedChat = formatedChat.replace(/<Thoughts>([\s\S]+?)<\/Thoughts>/g, (match, p1) => {
thoughts.push(p1)
return ''
})
Expand Down

0 comments on commit 6d182a8

Please sign in to comment.