Merge branch 'ChatGPTNextWeb:main' into main

This commit is contained in:
sijinhui 2024-02-29 18:43:18 +08:00 committed by GitHub
commit 3a5f0b2d0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,8 +9,9 @@ export function trimTopic(topic: string) {
// This will remove the specified punctuation from the end of the string
// and also trim quotes from both the start and end if they exist.
return topic
.replace(/^["“”]+|["“”]+$/g, "")
.replace(/[,。!?”“"、,.!?]*$/, "");
// fix for gemini
.replace(/^["“”*]+|["“”*]+$/g, "")
.replace(/[,。!?”“"、,.!?*]*$/, "");
}
export async function copyToClipboard(text: string) {