Merge remote-tracking branch 'upstream/main'

This commit is contained in:
dakai
2023-04-05 08:55:28 +08:00
8 changed files with 15 additions and 2 deletions

View File

@@ -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`;

View File

@@ -67,6 +67,7 @@ export function Markdown(props: { content: string }) {
components={{
pre: PreCode,
}}
linkTarget={'_blank'}
>
{props.content}
</ReactMarkdown>

View File

@@ -417,7 +417,7 @@ export function Settings(props: { closeSettings: () => void }) {
value={config.historyMessageCount}
min="0"
max="25"
step="2"
step="1"
onChange={(e) =>
updateConfig(
(config) =>