mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-06 23:56:25 +08:00
[opt] Optimize the display of exported chat history content.
This commit is contained in:
@@ -60,7 +60,9 @@ function exportMessages(messages: Message[], topic: string) {
|
||||
`# ${topic}\n\n` +
|
||||
messages
|
||||
.map((m) => {
|
||||
return m.role === "user" ? `## ${m.content}` : m.content.trim();
|
||||
return m.role === "user"
|
||||
? `## ${Locale.Export.MessageFromYou}:\n${m.content}`
|
||||
: `## ${Locale.Export.MessageFromChatGPT}:\n${m.content.trim()}`;
|
||||
})
|
||||
.join("\n\n");
|
||||
const filename = `${topic}.md`;
|
||||
|
Reference in New Issue
Block a user