fix(ApiService): remove quotes from message summaries

- Updated the fetchMessagesSummary function to remove all quotes from the generated summaries, ensuring cleaner output for the user.
This commit is contained in:
kangfenmao 2025-03-23 14:19:28 +08:00
parent 8628dc188b
commit c299d615fc

View File

@ -227,7 +227,9 @@ export async function fetchMessagesSummary({ messages, assistant }: { messages:
const AI = new AiProvider(provider)
try {
return await AI.summaries(filterMessages(messages), assistant)
const text = await AI.summaries(filterMessages(messages), assistant)
// Remove all quotes from the text
return text?.replace(/["']/g, '') || null
} catch (error: any) {
return null
}