mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 16:23:41 +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`;
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,8 @@ const cn = {
 | 
			
		||||
    Title: "导出聊天记录为 Markdown",
 | 
			
		||||
    Copy: "全部复制",
 | 
			
		||||
    Download: "下载文件",
 | 
			
		||||
    MessageFromYou: "来自你的消息",
 | 
			
		||||
    MessageFromChatGPT: "来自 ChatGPT 的消息",
 | 
			
		||||
  },
 | 
			
		||||
  Memory: {
 | 
			
		||||
    Title: "历史记忆",
 | 
			
		||||
 
 | 
			
		||||
@@ -35,6 +35,8 @@ const en: LocaleType = {
 | 
			
		||||
    Title: "All Messages",
 | 
			
		||||
    Copy: "Copy All",
 | 
			
		||||
    Download: "Download",
 | 
			
		||||
    MessageFromYou: "Message From You",
 | 
			
		||||
    MessageFromChatGPT: "Message From ChatGPT",
 | 
			
		||||
  },
 | 
			
		||||
  Memory: {
 | 
			
		||||
    Title: "Memory Prompt",
 | 
			
		||||
 
 | 
			
		||||
@@ -35,6 +35,8 @@ const es: LocaleType = {
 | 
			
		||||
    Title: "Todos los mensajes",
 | 
			
		||||
    Copy: "Copiar todo",
 | 
			
		||||
    Download: "Descargar",
 | 
			
		||||
    MessageFromYou: "Mensaje de ti",
 | 
			
		||||
    MessageFromChatGPT: "Mensaje de ChatGPT",
 | 
			
		||||
  },
 | 
			
		||||
  Memory: {
 | 
			
		||||
    Title: "Historial de memoria",
 | 
			
		||||
 
 | 
			
		||||
@@ -35,6 +35,8 @@ const it: LocaleType = {
 | 
			
		||||
    Title: "Tutti i messaggi",
 | 
			
		||||
    Copy: "Copia tutto",
 | 
			
		||||
    Download: "Scarica",
 | 
			
		||||
    MessageFromYou: "Messaggio da te",
 | 
			
		||||
    MessageFromChatGPT: "Messaggio da ChatGPT",
 | 
			
		||||
  },
 | 
			
		||||
  Memory: {
 | 
			
		||||
    Title: "Prompt di memoria",
 | 
			
		||||
 
 | 
			
		||||
@@ -34,6 +34,8 @@ const tw: LocaleType = {
 | 
			
		||||
    Title: "匯出聊天記錄為 Markdown",
 | 
			
		||||
    Copy: "複製全部",
 | 
			
		||||
    Download: "下載檔案",
 | 
			
		||||
    MessageFromYou: "來自你的訊息",
 | 
			
		||||
    MessageFromChatGPT: "來自 ChatGPT 的訊息",
 | 
			
		||||
  },
 | 
			
		||||
  Memory: {
 | 
			
		||||
    Title: "上下文記憶 Prompt",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user