forked from XiaoMo/ChatGPT-Next-Web
Merge pull request #434 from gaogao1030/optimize
[opt] Optimize the display of exported chat history content.
This commit is contained in:
commit
bd7567fa85
@ -60,7 +60,9 @@ function exportMessages(messages: Message[], topic: string) {
|
|||||||
`# ${topic}\n\n` +
|
`# ${topic}\n\n` +
|
||||||
messages
|
messages
|
||||||
.map((m) => {
|
.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");
|
.join("\n\n");
|
||||||
const filename = `${topic}.md`;
|
const filename = `${topic}.md`;
|
||||||
|
@ -33,6 +33,8 @@ const cn = {
|
|||||||
Title: "导出聊天记录为 Markdown",
|
Title: "导出聊天记录为 Markdown",
|
||||||
Copy: "全部复制",
|
Copy: "全部复制",
|
||||||
Download: "下载文件",
|
Download: "下载文件",
|
||||||
|
MessageFromYou: "来自你的消息",
|
||||||
|
MessageFromChatGPT: "来自 ChatGPT 的消息",
|
||||||
},
|
},
|
||||||
Memory: {
|
Memory: {
|
||||||
Title: "历史记忆",
|
Title: "历史记忆",
|
||||||
|
@ -35,6 +35,8 @@ const en: LocaleType = {
|
|||||||
Title: "All Messages",
|
Title: "All Messages",
|
||||||
Copy: "Copy All",
|
Copy: "Copy All",
|
||||||
Download: "Download",
|
Download: "Download",
|
||||||
|
MessageFromYou: "Message From You",
|
||||||
|
MessageFromChatGPT: "Message From ChatGPT",
|
||||||
},
|
},
|
||||||
Memory: {
|
Memory: {
|
||||||
Title: "Memory Prompt",
|
Title: "Memory Prompt",
|
||||||
|
@ -35,6 +35,8 @@ const es: LocaleType = {
|
|||||||
Title: "Todos los mensajes",
|
Title: "Todos los mensajes",
|
||||||
Copy: "Copiar todo",
|
Copy: "Copiar todo",
|
||||||
Download: "Descargar",
|
Download: "Descargar",
|
||||||
|
MessageFromYou: "Mensaje de ti",
|
||||||
|
MessageFromChatGPT: "Mensaje de ChatGPT",
|
||||||
},
|
},
|
||||||
Memory: {
|
Memory: {
|
||||||
Title: "Historial de memoria",
|
Title: "Historial de memoria",
|
||||||
|
@ -35,6 +35,8 @@ const it: LocaleType = {
|
|||||||
Title: "Tutti i messaggi",
|
Title: "Tutti i messaggi",
|
||||||
Copy: "Copia tutto",
|
Copy: "Copia tutto",
|
||||||
Download: "Scarica",
|
Download: "Scarica",
|
||||||
|
MessageFromYou: "Messaggio da te",
|
||||||
|
MessageFromChatGPT: "Messaggio da ChatGPT",
|
||||||
},
|
},
|
||||||
Memory: {
|
Memory: {
|
||||||
Title: "Prompt di memoria",
|
Title: "Prompt di memoria",
|
||||||
|
@ -34,6 +34,8 @@ const tw: LocaleType = {
|
|||||||
Title: "匯出聊天記錄為 Markdown",
|
Title: "匯出聊天記錄為 Markdown",
|
||||||
Copy: "複製全部",
|
Copy: "複製全部",
|
||||||
Download: "下載檔案",
|
Download: "下載檔案",
|
||||||
|
MessageFromYou: "來自你的訊息",
|
||||||
|
MessageFromChatGPT: "來自 ChatGPT 的訊息",
|
||||||
},
|
},
|
||||||
Memory: {
|
Memory: {
|
||||||
Title: "上下文記憶 Prompt",
|
Title: "上下文記憶 Prompt",
|
||||||
|
Loading…
Reference in New Issue
Block a user