diff --git a/app/components/exporter.module.scss b/app/components/exporter.module.scss index c2046ffc09d..ed6289f175f 100644 --- a/app/components/exporter.module.scss +++ b/app/components/exporter.module.scss @@ -197,6 +197,12 @@ } } + &-system { + .body { + background-color: var(--white); + } + } + &-user { flex-direction: row-reverse; diff --git a/app/components/exporter.tsx b/app/components/exporter.tsx index 60a2eca0498..211b44464c6 100644 --- a/app/components/exporter.tsx +++ b/app/components/exporter.tsx @@ -447,8 +447,13 @@ export function ImagePreviewer(props: { if (isMobile || (isApp && window.__TAURI__)) { if (isApp && window.__TAURI__) { + /** + * Fixed Tauri client app + * Resolved the issue where files couldn't be saved when there was a `:` in the dialog. + */ + const fileName = props.topic.replace(/:/g, ''); const result = await window.__TAURI__.dialog.save({ - defaultPath: `${props.topic}.png`, + defaultPath: `${fileName}.png`, filters: [ { name: "PNG Files", @@ -607,8 +612,13 @@ export function MarkdownPreviewer(props: { if (isApp && window.__TAURI__) { try { + const fileName = props.topic.replace(/:/g, ''); const result = await window.__TAURI__.dialog.save({ - defaultPath: `${props.topic}.md`, + /** + * Fixed Tauri client app + * Resolved the issue where files couldn't be saved when there was a `:` in the dialog. + */ + defaultPath: `${fileName}.md`, filters: [ { name: "MD Files", @@ -662,10 +672,6 @@ export function JsonPreviewer(props: { }) { const msgs = { messages: [ - { - role: "system", - content: `${Locale.FineTuned.Sysmessage} ${props.topic}`, - }, ...props.messages.map((m) => ({ role: m.role, content: m.content, diff --git a/app/locales/en.ts b/app/locales/en.ts index 1b6e31282d1..eb8b633fe8b 100644 --- a/app/locales/en.ts +++ b/app/locales/en.ts @@ -81,7 +81,7 @@ const en: LocaleType = { UI: { MasksSuccess: "Successfully updated session of masks", MasksFail: "Failed to update session of masks", - Summarizing: "正在总结当前会话的内容", + Summarizing: "Summarizing a current session of this conversation", SummarizeSuccess: "Successfully summarize session of this chat", SummarizeFail: "Failed to summarize session of this chat", }, diff --git a/app/utils.ts b/app/utils.ts index f69929c747d..3b53311249b 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -42,12 +42,18 @@ export async function downloadAs(text: object, filename: string) { try { if (window.__TAURI__) { + /** + * Fixed client app [Tauri] + * Resolved the issue where files couldn't be saved when there was a `:` in the dialog. + **/ + const fileName = filename.replace(/:/g, ''); + const fileExtension = fileName.split('.').pop(); const result = await window.__TAURI__.dialog.save({ - defaultPath: `${filename}`, + defaultPath: `${fileName}`, filters: [ { - name: `${filename.split('.').pop()} files`, - extensions: [`${filename.split('.').pop()}`], + name: `${fileExtension} files`, + extensions: [`${fileExtension}`], }, { name: "All Files",