@lobehub/chat 1.124.4 → 1.126.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/rules/react-component.mdc +1 -0
- package/.github/scripts/pr-comment.js +11 -2
- package/.github/workflows/auto-i18n.yml +1 -1
- package/.github/workflows/desktop-pr-build.yml +103 -23
- package/.github/workflows/docker-database.yml +1 -4
- package/.github/workflows/release-desktop-beta.yml +101 -24
- package/.github/workflows/release.yml +3 -2
- package/.github/workflows/test.yml +12 -9
- package/CHANGELOG.md +50 -0
- package/apps/desktop/electron-builder.js +8 -4
- package/changelog/v1.json +14 -0
- package/locales/ar/editor.json +7 -0
- package/locales/bg-BG/editor.json +7 -0
- package/locales/de-DE/editor.json +7 -0
- package/locales/en-US/editor.json +7 -0
- package/locales/es-ES/editor.json +7 -0
- package/locales/fa-IR/editor.json +7 -0
- package/locales/fr-FR/editor.json +7 -0
- package/locales/it-IT/editor.json +7 -0
- package/locales/ja-JP/editor.json +7 -0
- package/locales/ko-KR/editor.json +7 -0
- package/locales/nl-NL/editor.json +7 -0
- package/locales/pl-PL/editor.json +7 -0
- package/locales/pt-BR/editor.json +7 -0
- package/locales/ru-RU/editor.json +7 -0
- package/locales/tr-TR/editor.json +7 -0
- package/locales/vi-VN/editor.json +7 -0
- package/locales/zh-CN/editor.json +7 -0
- package/locales/zh-TW/editor.json +7 -0
- package/package.json +2 -2
- package/scripts/electronWorkflow/mergeMacReleaseFiles.js +179 -0
- package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/ClassicChat.tsx +153 -0
- package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/GroupChat.tsx +153 -0
- package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/index.tsx +3 -145
- package/src/app/[variants]/(main)/image/@menu/features/ConfigPanel/components/ImageConfigSkeleton.tsx +53 -0
- package/src/app/[variants]/(main)/image/@menu/features/ConfigPanel/index.tsx +14 -2
- package/src/features/ChatInput/InputEditor/index.tsx +20 -5
- package/src/features/ChatInput/TypoBar/index.tsx +17 -0
- package/src/hooks/useFetchAiImageConfig.ts +49 -0
- package/src/locales/default/editor.ts +7 -0
- package/src/store/aiInfra/slices/aiModel/selectors.test.ts +1 -0
- package/src/store/aiInfra/slices/aiProvider/__tests__/action.test.ts +199 -140
- package/src/store/aiInfra/slices/aiProvider/action.ts +11 -4
- package/src/store/aiInfra/slices/aiProvider/initialState.ts +2 -0
- package/src/store/aiInfra/slices/aiProvider/selectors.ts +3 -0
- package/src/store/global/initialState.ts +8 -0
- package/src/store/global/selectors/systemStatus.ts +5 -3
- package/src/store/image/slices/generationConfig/action.test.ts +331 -150
- package/src/store/image/slices/generationConfig/action.ts +100 -23
- package/src/store/image/slices/generationConfig/initialState.ts +6 -0
- package/src/store/image/utils/aspectRatio.test.ts +148 -0
- package/src/store/image/utils/aspectRatio.ts +45 -0
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "Покажи лентата за форматиране"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "Отказ",
|
|
13
|
+
"confirm": "Потвърждение",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "Грешка: {{message}}",
|
|
14
16
|
"uploading": "Качване на файл..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "Въведете URL адрес на връзката",
|
|
23
25
|
"unlink": "Премахни връзката"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "Моля, въведете TeX формула"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "Премахни таблицата",
|
|
27
32
|
"deleteColumn": "Премахни колоната",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "Номериран списък",
|
|
43
48
|
"strikethrough": "Зачеркване",
|
|
44
49
|
"table": "Вмъкване на таблица",
|
|
50
|
+
"taskList": "Списък със задачи",
|
|
51
|
+
"tex": "TeX формула",
|
|
45
52
|
"underline": "Подчертаване"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "Formatierungsleiste anzeigen"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "Abbrechen",
|
|
13
|
+
"confirm": "Bestätigen",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "Fehler: {{message}}",
|
|
14
16
|
"uploading": "Datei wird hochgeladen..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "Link-URL eingeben",
|
|
23
25
|
"unlink": "Link entfernen"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "Bitte TeX-Formel eingeben"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "Tabelle löschen",
|
|
27
32
|
"deleteColumn": "Spalte löschen",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "Nummerierte Liste",
|
|
43
48
|
"strikethrough": "Durchgestrichen",
|
|
44
49
|
"table": "Tabelle einfügen",
|
|
50
|
+
"taskList": "Aufgabenliste",
|
|
51
|
+
"tex": "TeX-Formel",
|
|
45
52
|
"underline": "Unterstrichen"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "Show formatting toolbar"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "Cancel",
|
|
13
|
+
"confirm": "Confirm",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "Error: {{message}}",
|
|
14
16
|
"uploading": "Uploading file..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "Enter link URL",
|
|
23
25
|
"unlink": "Unlink"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "Please enter a TeX formula"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "Delete table",
|
|
27
32
|
"deleteColumn": "Delete column",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "Numbered list",
|
|
43
48
|
"strikethrough": "Strikethrough",
|
|
44
49
|
"table": "Insert table",
|
|
50
|
+
"taskList": "Task List",
|
|
51
|
+
"tex": "TeX Formula",
|
|
45
52
|
"underline": "Underline"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "Mostrar barra de herramientas de formato"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "Cancelar",
|
|
13
|
+
"confirm": "Confirmar",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "Error: {{message}}",
|
|
14
16
|
"uploading": "Subiendo archivo..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "Introduce la URL del enlace",
|
|
23
25
|
"unlink": "Quitar enlace"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "Por favor, introduzca la fórmula TeX"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "Eliminar tabla",
|
|
27
32
|
"deleteColumn": "Eliminar columna",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "Lista ordenada",
|
|
43
48
|
"strikethrough": "Tachado",
|
|
44
49
|
"table": "Insertar tabla",
|
|
50
|
+
"taskList": "Lista de tareas",
|
|
51
|
+
"tex": "Fórmula TeX",
|
|
45
52
|
"underline": "Subrayado"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "نمایش نوار ابزار قالببندی"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "لغو",
|
|
13
|
+
"confirm": "تأیید",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "خطا: {{message}}",
|
|
14
16
|
"uploading": "در حال بارگذاری فایل..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "آدرس URL پیوند را وارد کنید",
|
|
23
25
|
"unlink": "حذف پیوند"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "لطفاً فرمول TeX را وارد کنید"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "حذف جدول",
|
|
27
32
|
"deleteColumn": "حذف ستون",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "فهرست شمارهدار",
|
|
43
48
|
"strikethrough": "خط خورده",
|
|
44
49
|
"table": "درج جدول",
|
|
50
|
+
"taskList": "فهرست وظایف",
|
|
51
|
+
"tex": "فرمول TeX",
|
|
45
52
|
"underline": "زیرخط"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "Afficher la barre d'outils de formatage"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "Annuler",
|
|
13
|
+
"confirm": "Confirmer",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "Erreur : {{message}}",
|
|
14
16
|
"uploading": "Téléversement du fichier en cours..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "Entrez l'URL du lien",
|
|
23
25
|
"unlink": "Supprimer le lien"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "Veuillez saisir une formule TeX"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "Supprimer le tableau",
|
|
27
32
|
"deleteColumn": "Supprimer la colonne",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "Liste numérotée",
|
|
43
48
|
"strikethrough": "Barré",
|
|
44
49
|
"table": "Insérer un tableau",
|
|
50
|
+
"taskList": "Liste des tâches",
|
|
51
|
+
"tex": "Formule TeX",
|
|
45
52
|
"underline": "Souligné"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "Mostra barra degli strumenti di formattazione"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "Annulla",
|
|
13
|
+
"confirm": "Conferma",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "Errore: {{message}}",
|
|
14
16
|
"uploading": "Caricamento file in corso..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "Inserisci URL del link",
|
|
23
25
|
"unlink": "Rimuovi link"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "Inserisci la formula TeX"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "Elimina tabella",
|
|
27
32
|
"deleteColumn": "Elimina colonna",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "Elenco numerato",
|
|
43
48
|
"strikethrough": "Testo barrato",
|
|
44
49
|
"table": "Inserisci tabella",
|
|
50
|
+
"taskList": "Elenco attività",
|
|
51
|
+
"tex": "Formula TeX",
|
|
45
52
|
"underline": "Sottolineato"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "書式ツールバーを表示"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "キャンセル",
|
|
13
|
+
"confirm": "確認",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "エラー:{{message}}",
|
|
14
16
|
"uploading": "ファイルをアップロードしています..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "リンクの URL を入力",
|
|
23
25
|
"unlink": "リンクを解除"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "TeX 公式を入力してください"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "表を削除",
|
|
27
32
|
"deleteColumn": "列を削除",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "番号付きリスト",
|
|
43
48
|
"strikethrough": "取り消し線",
|
|
44
49
|
"table": "表を挿入",
|
|
50
|
+
"taskList": "タスクリスト",
|
|
51
|
+
"tex": "TeX 公式",
|
|
45
52
|
"underline": "下線"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "서식 도구 모음 표시"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "취소",
|
|
13
|
+
"confirm": "확인",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "오류: {{message}}",
|
|
14
16
|
"uploading": "파일 업로드 중..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "링크 URL 입력",
|
|
23
25
|
"unlink": "링크 제거"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "TeX 수식을 입력하세요"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "테이블 삭제",
|
|
27
32
|
"deleteColumn": "열 삭제",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "번호 매긴 목록",
|
|
43
48
|
"strikethrough": "취소선",
|
|
44
49
|
"table": "표 삽입",
|
|
50
|
+
"taskList": "작업 목록",
|
|
51
|
+
"tex": "TeX 수식",
|
|
45
52
|
"underline": "밑줄"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "Toon opmaakwerkbalk"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "Annuleren",
|
|
13
|
+
"confirm": "Bevestigen",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "Fout: {{message}}",
|
|
14
16
|
"uploading": "Bestand wordt geüpload..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "Voer de URL van de link in",
|
|
23
25
|
"unlink": "Link verwijderen"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "Voer TeX-formule in"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "Tabel verwijderen",
|
|
27
32
|
"deleteColumn": "Kolom verwijderen",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "Genummerde lijst",
|
|
43
48
|
"strikethrough": "Doorhalen",
|
|
44
49
|
"table": "Tabel invoegen",
|
|
50
|
+
"taskList": "Takenlijst",
|
|
51
|
+
"tex": "TeX-formule",
|
|
45
52
|
"underline": "Onderstrepen"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "Pokaż pasek narzędzi formatowania"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "Anuluj",
|
|
13
|
+
"confirm": "Potwierdź",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "Błąd: {{message}}",
|
|
14
16
|
"uploading": "Przesyłanie pliku..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "Wpisz adres URL linku",
|
|
23
25
|
"unlink": "Usuń link"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "Wprowadź formułę TeX"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "Usuń tabelę",
|
|
27
32
|
"deleteColumn": "Usuń kolumnę",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "Lista numerowana",
|
|
43
48
|
"strikethrough": "Przekreślenie",
|
|
44
49
|
"table": "Wstaw tabelę",
|
|
50
|
+
"taskList": "Lista zadań",
|
|
51
|
+
"tex": "Formuła TeX",
|
|
45
52
|
"underline": "Podkreślenie"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "Mostrar barra de formatação"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "Cancelar",
|
|
13
|
+
"confirm": "Confirmar",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "Erro: {{message}}",
|
|
14
16
|
"uploading": "Enviando arquivo..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "Digite a URL do link",
|
|
23
25
|
"unlink": "Remover link"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "Por favor, insira a fórmula TeX"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "Excluir tabela",
|
|
27
32
|
"deleteColumn": "Excluir coluna",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "Lista numerada",
|
|
43
48
|
"strikethrough": "Tachado",
|
|
44
49
|
"table": "Inserir tabela",
|
|
50
|
+
"taskList": "Lista de Tarefas",
|
|
51
|
+
"tex": "Fórmula TeX",
|
|
45
52
|
"underline": "Sublinhado"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "Показать панель форматирования"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "Отмена",
|
|
13
|
+
"confirm": "Подтвердить",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "Ошибка: {{message}}",
|
|
14
16
|
"uploading": "Загрузка файла..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "Введите URL ссылки",
|
|
23
25
|
"unlink": "Удалить ссылку"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "Введите формулу TeX"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "Удалить таблицу",
|
|
27
32
|
"deleteColumn": "Удалить столбец",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "Нумерованный список",
|
|
43
48
|
"strikethrough": "Зачёркнутый",
|
|
44
49
|
"table": "Вставить таблицу",
|
|
50
|
+
"taskList": "Список задач",
|
|
51
|
+
"tex": "Формула TeX",
|
|
45
52
|
"underline": "Подчёркнутый"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "Biçim araç çubuğunu göster"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "İptal",
|
|
13
|
+
"confirm": "Onayla",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "Hata: {{message}}",
|
|
14
16
|
"uploading": "Dosya yükleniyor..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "Bağlantı URL'si girin",
|
|
23
25
|
"unlink": "Bağlantıyı kaldır"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "Lütfen TeX formülünü girin"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "Tabloyu sil",
|
|
27
32
|
"deleteColumn": "Sütunu sil",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "Numaralı liste",
|
|
43
48
|
"strikethrough": "Üstü çizili",
|
|
44
49
|
"table": "Tablo ekle",
|
|
50
|
+
"taskList": "Görev Listesi",
|
|
51
|
+
"tex": "TeX Formülü",
|
|
45
52
|
"underline": "Altı çizili"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "Hiển thị thanh công cụ định dạng"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "Hủy",
|
|
13
|
+
"confirm": "Xác nhận",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "Lỗi: {{message}}",
|
|
14
16
|
"uploading": "Đang tải tệp lên..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "Nhập URL liên kết",
|
|
23
25
|
"unlink": "Gỡ liên kết"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "Vui lòng nhập công thức TeX"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "Xóa bảng",
|
|
27
32
|
"deleteColumn": "Xóa cột",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "Danh sách có thứ tự",
|
|
43
48
|
"strikethrough": "Gạch ngang",
|
|
44
49
|
"table": "Chèn bảng",
|
|
50
|
+
"taskList": "Danh sách công việc",
|
|
51
|
+
"tex": "Công thức TeX",
|
|
45
52
|
"underline": "Gạch chân"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "显示格式工具栏"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "取消",
|
|
13
|
+
"confirm": "确认",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "错误:{{message}}",
|
|
14
16
|
"uploading": "正在上传文件..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "输入链接 URL",
|
|
23
25
|
"unlink": "取消链接"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "请输入 TeX 公式"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "删除表格",
|
|
27
32
|
"deleteColumn": "删除列",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "有序列表",
|
|
43
48
|
"strikethrough": "删除线",
|
|
44
49
|
"table": "插入表格",
|
|
50
|
+
"taskList": "任务列表",
|
|
51
|
+
"tex": "TeX 公式",
|
|
45
52
|
"underline": "下划线"
|
|
46
53
|
}
|
|
47
54
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"on": "顯示格式工具列"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"cancel": "取消",
|
|
13
|
+
"confirm": "確認",
|
|
12
14
|
"file": {
|
|
13
15
|
"error": "錯誤:{{message}}",
|
|
14
16
|
"uploading": "正在上傳檔案..."
|
|
@@ -22,6 +24,9 @@
|
|
|
22
24
|
"placeholder": "輸入連結 URL",
|
|
23
25
|
"unlink": "取消連結"
|
|
24
26
|
},
|
|
27
|
+
"math": {
|
|
28
|
+
"placeholder": "請輸入 TeX 公式"
|
|
29
|
+
},
|
|
25
30
|
"table": {
|
|
26
31
|
"delete": "刪除表格",
|
|
27
32
|
"deleteColumn": "刪除列",
|
|
@@ -42,6 +47,8 @@
|
|
|
42
47
|
"numberList": "有序清單",
|
|
43
48
|
"strikethrough": "刪除線",
|
|
44
49
|
"table": "插入表格",
|
|
50
|
+
"taskList": "任務列表",
|
|
51
|
+
"tex": "TeX 公式",
|
|
45
52
|
"underline": "底線"
|
|
46
53
|
}
|
|
47
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.126.0",
|
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"@lobehub/charts": "^2.0.0",
|
|
156
156
|
"@lobehub/chat-plugin-sdk": "^1.32.4",
|
|
157
157
|
"@lobehub/chat-plugins-gateway": "^1.9.0",
|
|
158
|
-
"@lobehub/editor": "^1.
|
|
158
|
+
"@lobehub/editor": "^1.5.4",
|
|
159
159
|
"@lobehub/icons": "^2.31.0",
|
|
160
160
|
"@lobehub/market-sdk": "^0.22.7",
|
|
161
161
|
"@lobehub/tts": "^2.0.1",
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/* eslint-disable unicorn/no-process-exit, unicorn/prefer-top-level-await */
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import YAML from 'yaml';
|
|
5
|
+
|
|
6
|
+
// 配置
|
|
7
|
+
const FILE_NAME = 'latest-mac.yml';
|
|
8
|
+
const RELEASE_DIR = path.resolve('release');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 检测 latest-mac.yml 文件的平台类型
|
|
12
|
+
* @param {Object} yamlContent - YAML 文件内容
|
|
13
|
+
* @returns {'x64' | 'arm64' | 'both' | 'none'}
|
|
14
|
+
*/
|
|
15
|
+
function detectPlatform(yamlContent) {
|
|
16
|
+
const hasX64 = yamlContent.files.some((file) => file.url.includes('-x64.dmg'));
|
|
17
|
+
const hasArm64 = yamlContent.files.some((file) => file.url.includes('-arm64.dmg'));
|
|
18
|
+
|
|
19
|
+
if (hasX64 && hasArm64) return 'both';
|
|
20
|
+
if (hasX64 && !hasArm64) return 'x64';
|
|
21
|
+
if (!hasX64 && hasArm64) return 'arm64';
|
|
22
|
+
return 'none';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 合并两个 latest-mac.yml 文件
|
|
27
|
+
* @param {Object} x64Content - x64 平台的 YAML 内容
|
|
28
|
+
* @param {Object} arm64Content - ARM64 平台的 YAML 内容
|
|
29
|
+
* @returns {string} 合并后的 YAML 字符串
|
|
30
|
+
*/
|
|
31
|
+
function mergeYamlFiles(x64Content, arm64Content) {
|
|
32
|
+
// 以 ARM64 为基础(Apple Silicon 优先)
|
|
33
|
+
const merged = {
|
|
34
|
+
...arm64Content,
|
|
35
|
+
files: [...arm64Content.files, ...x64Content.files],
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return YAML.stringify(merged);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 读取本地文件
|
|
43
|
+
* @param {string} filePath - 文件路径
|
|
44
|
+
* @returns {string | null} 文件内容或 null
|
|
45
|
+
*/
|
|
46
|
+
function readLocalFile(filePath) {
|
|
47
|
+
try {
|
|
48
|
+
if (fs.existsSync(filePath)) {
|
|
49
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
50
|
+
console.log(`✅ Read local file: ${filePath} (${content.length} chars)`);
|
|
51
|
+
return content;
|
|
52
|
+
}
|
|
53
|
+
console.log(`⚠️ Local file not found: ${filePath}`);
|
|
54
|
+
return null;
|
|
55
|
+
} catch (error) {
|
|
56
|
+
console.error(`❌ Error reading local file ${filePath}:`, error);
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* 写入本地文件
|
|
63
|
+
* @param {string} filePath - 文件路径
|
|
64
|
+
* @param {string} content - 文件内容
|
|
65
|
+
*/
|
|
66
|
+
function writeLocalFile(filePath, content) {
|
|
67
|
+
try {
|
|
68
|
+
fs.writeFileSync(filePath, content, 'utf8');
|
|
69
|
+
console.log(`✅ Written local file: ${filePath} (${content.length} chars)`);
|
|
70
|
+
} catch (error) {
|
|
71
|
+
console.error(`❌ Error writing local file ${filePath}:`, error);
|
|
72
|
+
throw error;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* 主函数
|
|
78
|
+
*/
|
|
79
|
+
async function main() {
|
|
80
|
+
try {
|
|
81
|
+
console.log('🚀 Starting macOS Release file merge');
|
|
82
|
+
console.log(`📁 Working directory: ${RELEASE_DIR}`);
|
|
83
|
+
|
|
84
|
+
// 1. 检查 release 目录下的所有文件
|
|
85
|
+
const releaseFiles = fs.readdirSync(RELEASE_DIR);
|
|
86
|
+
console.log(`📂 Files in release directory: ${releaseFiles.join(', ')}`);
|
|
87
|
+
|
|
88
|
+
// 2. 查找所有 latest-mac*.yml 文件
|
|
89
|
+
const macYmlFiles = releaseFiles.filter(
|
|
90
|
+
(f) => f.startsWith('latest-mac') && f.endsWith('.yml'),
|
|
91
|
+
);
|
|
92
|
+
console.log(`🔍 Found macOS YAML files: ${macYmlFiles.join(', ')}`);
|
|
93
|
+
|
|
94
|
+
if (macYmlFiles.length === 0) {
|
|
95
|
+
console.log('⚠️ No macOS YAML files found, skipping merge');
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// 3. 处理找到的文件,识别平台
|
|
100
|
+
const macFiles = [];
|
|
101
|
+
|
|
102
|
+
for (const fileName of macYmlFiles) {
|
|
103
|
+
const filePath = path.join(RELEASE_DIR, fileName);
|
|
104
|
+
const content = readLocalFile(filePath);
|
|
105
|
+
|
|
106
|
+
if (!content) continue;
|
|
107
|
+
|
|
108
|
+
try {
|
|
109
|
+
const yamlContent = YAML.parse(content);
|
|
110
|
+
const platform = detectPlatform(yamlContent);
|
|
111
|
+
|
|
112
|
+
if (platform === 'x64' || platform === 'arm64') {
|
|
113
|
+
macFiles.push({ content, filename: fileName, platform, yaml: yamlContent });
|
|
114
|
+
console.log(`🔍 Detected ${platform} platform in ${fileName}`);
|
|
115
|
+
} else if (platform === 'both') {
|
|
116
|
+
console.log(`✅ Found already merged file: ${fileName}`);
|
|
117
|
+
// 如果已经是合并后的文件,直接复制为最终文件
|
|
118
|
+
writeLocalFile(path.join(RELEASE_DIR, FILE_NAME), content);
|
|
119
|
+
return;
|
|
120
|
+
} else {
|
|
121
|
+
console.log(`⚠️ Unknown platform type: ${platform} in ${fileName}`);
|
|
122
|
+
}
|
|
123
|
+
} catch (error) {
|
|
124
|
+
console.warn(`⚠️ Failed to parse ${fileName}:`, error);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// 4. 检查是否有两个不同平台的文件
|
|
129
|
+
const x64Files = macFiles.filter((f) => f.platform === 'x64');
|
|
130
|
+
const arm64Files = macFiles.filter((f) => f.platform === 'arm64');
|
|
131
|
+
|
|
132
|
+
if (x64Files.length === 0 && arm64Files.length === 0) {
|
|
133
|
+
console.log('⚠️ No valid platform files found');
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (x64Files.length === 0) {
|
|
138
|
+
console.log('⚠️ No x64 files found, using ARM64 only');
|
|
139
|
+
writeLocalFile(path.join(RELEASE_DIR, FILE_NAME), arm64Files[0].content);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (arm64Files.length === 0) {
|
|
144
|
+
console.log('⚠️ No ARM64 files found, using x64 only');
|
|
145
|
+
writeLocalFile(path.join(RELEASE_DIR, FILE_NAME), x64Files[0].content);
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// 5. 合并 x64 和 ARM64 文件
|
|
150
|
+
const x64File = x64Files[0];
|
|
151
|
+
const arm64File = arm64Files[0];
|
|
152
|
+
|
|
153
|
+
console.log(`🔄 Merging ${x64File.filename} (x64) and ${arm64File.filename} (ARM64)...`);
|
|
154
|
+
const mergedContent = mergeYamlFiles(x64File.yaml, arm64File.yaml);
|
|
155
|
+
|
|
156
|
+
// 6. 保存合并后的文件
|
|
157
|
+
const mergedFilePath = path.join(RELEASE_DIR, FILE_NAME);
|
|
158
|
+
writeLocalFile(mergedFilePath, mergedContent);
|
|
159
|
+
|
|
160
|
+
// 7. 验证合并结果
|
|
161
|
+
const mergedYaml = YAML.parse(mergedContent);
|
|
162
|
+
const finalPlatform = detectPlatform(mergedYaml);
|
|
163
|
+
|
|
164
|
+
if (finalPlatform === 'both') {
|
|
165
|
+
console.log('✅ Successfully merged both x64 and ARM64 platforms');
|
|
166
|
+
console.log(`📊 Final file contains ${mergedYaml.files.length} files`);
|
|
167
|
+
} else {
|
|
168
|
+
console.warn(`⚠️ Merge result unexpected: ${finalPlatform}`);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
console.log('🎉 Merge complete!');
|
|
172
|
+
} catch (error) {
|
|
173
|
+
console.error('❌ Error during merge:', error);
|
|
174
|
+
process.exit(1);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// 运行主函数
|
|
179
|
+
await main();
|