@lobehub/chat 1.36.29 → 1.36.30
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/CHANGELOG.md +25 -0
- package/changelog/v1.json +9 -0
- package/locales/ar/common.json +4 -2
- package/locales/bg-BG/common.json +4 -2
- package/locales/de-DE/common.json +4 -2
- package/locales/en-US/common.json +4 -2
- package/locales/es-ES/common.json +4 -2
- package/locales/fa-IR/common.json +4 -2
- package/locales/fr-FR/common.json +4 -2
- package/locales/it-IT/common.json +4 -2
- package/locales/ja-JP/common.json +4 -2
- package/locales/ko-KR/common.json +4 -2
- package/locales/nl-NL/common.json +4 -2
- package/locales/pl-PL/common.json +4 -2
- package/locales/pt-BR/common.json +4 -2
- package/locales/ru-RU/common.json +4 -2
- package/locales/tr-TR/common.json +4 -2
- package/locales/vi-VN/common.json +4 -2
- package/locales/zh-CN/common.json +4 -2
- package/locales/zh-TW/common.json +4 -2
- package/next.config.mjs +5 -0
- package/package.json +1 -1
- package/src/app/loading/Content.tsx +7 -4
- package/src/app/loading/Redirect.tsx +13 -5
- package/src/app/loading/index.tsx +5 -3
- package/src/app/loading/type.ts +6 -0
- package/src/components/FullscreenLoading/index.tsx +2 -2
- package/src/layout/GlobalProvider/index.tsx +3 -0
- package/src/locales/default/common.ts +4 -2
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,31 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.36.30](https://github.com/lobehub/lobe-chat/compare/v1.36.29...v1.36.30)
|
6
|
+
|
7
|
+
<sup>Released on **2024-12-16**</sup>
|
8
|
+
|
9
|
+
#### 💄 Styles
|
10
|
+
|
11
|
+
- **misc**: Improve page loading state.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### Styles
|
19
|
+
|
20
|
+
- **misc**: Improve page loading state, closes [#5048](https://github.com/lobehub/lobe-chat/issues/5048) ([e63249b](https://github.com/lobehub/lobe-chat/commit/e63249b))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
5
30
|
### [Version 1.36.29](https://github.com/lobehub/lobe-chat/compare/v1.36.28...v1.36.29)
|
6
31
|
|
7
32
|
<sup>Released on **2024-12-16**</sup>
|
package/changelog/v1.json
CHANGED
package/locales/ar/common.json
CHANGED
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "جارٍ تحميل صفحة الدردشة...",
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) جارٍ تحميل صفحة الدردشة...",
|
14
|
+
"initAuth": "(2/4) جاري تهيئة خدمة المصادقة...",
|
15
|
+
"initUser": "(3/4) جاري تهيئة حالة المستخدم...",
|
16
|
+
"initializing": "(1/4) جارٍ تشغيل التطبيق..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "توليد تلقائي",
|
17
19
|
"autoGenerateTooltip": "إكمال تلقائي بناءً على الكلمات المقترحة لوصف المساعد",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "Зареждане на страницата за
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) Зареждане на страницата за разговори...",
|
14
|
+
"initAuth": "(2/4) Инициализиране на услугата за удостоверяване...",
|
15
|
+
"initUser": "(3/4) Инициализиране на състоянието на потребителя...",
|
16
|
+
"initializing": "(1/4) Стартиране на приложението..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "Автоматично генериране",
|
17
19
|
"autoGenerateTooltip": "Автоматично генериране на описание на агент въз основа на подкани",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "Lade die Chat-Seite...",
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) Lade die Chat-Seite...",
|
14
|
+
"initAuth": "(2/4) Authentifizierungsdienst wird initialisiert...",
|
15
|
+
"initUser": "(3/4) Benutzerstatus wird initialisiert...",
|
16
|
+
"initializing": "(1/4) Anwendung wird gestartet..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "Automatisch generieren",
|
17
19
|
"autoGenerateTooltip": "Assistentenbeschreibung automatisch auf Basis von Vorschlägen vervollständigen",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "Loading chat page...",
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) Loading chat page...",
|
14
|
+
"initAuth": "(2/4) Initializing authentication service...",
|
15
|
+
"initUser": "(3/4) Initializing user status...",
|
16
|
+
"initializing": "(1/4) Starting up application..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "Auto Generate",
|
17
19
|
"autoGenerateTooltip": "Auto-generate assistant description based on prompts",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "Cargando página de chat...",
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) Cargando la página de chat...",
|
14
|
+
"initAuth": "(2/4) Inicializando el servicio de autenticación...",
|
15
|
+
"initUser": "(3/4) Inicializando el estado del usuario...",
|
16
|
+
"initializing": "(1/4) Iniciando la aplicación..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "Generación automática",
|
17
19
|
"autoGenerateTooltip": "Completar automáticamente la descripción del asistente basándose en las sugerencias",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "در حال بارگذاری صفحه گفتگو...",
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) در حال بارگذاری صفحه گفتگو...",
|
14
|
+
"initAuth": "(2/4) در حال راهاندازی سرویس احراز هویت...",
|
15
|
+
"initUser": "(3/4) در حال راهاندازی وضعیت کاربر...",
|
16
|
+
"initializing": "(1/4) در حال راهاندازی برنامه..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "تکمیل خودکار",
|
17
19
|
"autoGenerateTooltip": "تکمیل خودکار توضیحات دستیار بر اساس کلمات راهنما",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "Chargement de la page de
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) Chargement de la page de conversation...",
|
14
|
+
"initAuth": "(2/4) Initialisation du service d'authentification...",
|
15
|
+
"initUser": "(3/4) Initialisation de l'état de l'utilisateur...",
|
16
|
+
"initializing": "(1/4) L'application se lance..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "Générer automatiquement",
|
17
19
|
"autoGenerateTooltip": "Générer automatiquement la description de l'agent basée sur les suggestions",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "Caricamento della pagina
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) Caricamento della pagina della chat in corso...",
|
14
|
+
"initAuth": "(2/4) Inizializzazione del servizio di autenticazione...",
|
15
|
+
"initUser": "(3/4) Inizializzazione dello stato utente...",
|
16
|
+
"initializing": "(1/4) Avvio dell'app in corso..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "Generazione automatica",
|
17
19
|
"autoGenerateTooltip": "Completamento automatico basato su suggerimenti",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "チャットページを読み込んでいます...",
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) チャットページを読み込んでいます...",
|
14
|
+
"initAuth": "(2/4) 認証サービスの初期化...",
|
15
|
+
"initUser": "(3/4) ユーザー状態の初期化...",
|
16
|
+
"initializing": "(1/4) アプリを起動しています..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "自動生成",
|
17
19
|
"autoGenerateTooltip": "ヒントに基づいてエージェントの説明を自動生成します",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "대화 페이지 로딩 중...",
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) 대화 페이지 로딩 중...",
|
14
|
+
"initAuth": "(2/4) 인증 서비스 초기화 중...",
|
15
|
+
"initUser": "(3/4) 사용자 상태 초기화 중...",
|
16
|
+
"initializing": "(1/4) 애플리케이션 시작 중..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "자동 생성",
|
17
19
|
"autoGenerateTooltip": "힌트 단어를 기반으로 에이전트 설명을 자동으로 완성합니다",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "De chatpagina wordt geladen...",
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) De chatpagina wordt geladen...",
|
14
|
+
"initAuth": "(2/4) Initialisatie van de autorisatiedienst...",
|
15
|
+
"initUser": "(3/4) Initialisatie van de gebruikersstatus...",
|
16
|
+
"initializing": "(1/4) De applicatie wordt opgestart..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "Automatisch genereren",
|
17
19
|
"autoGenerateTooltip": "Automatisch assistentbeschrijving genereren op basis van suggesties",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "Ładowanie strony czatu...",
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) Ładowanie strony czatu...",
|
14
|
+
"initAuth": "(2/4) Inicjalizacja usługi autoryzacji...",
|
15
|
+
"initUser": "(3/4) Inicjalizacja stanu użytkownika...",
|
16
|
+
"initializing": "(1/4) Uruchamianie aplikacji..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "Automatyczne generowanie",
|
17
19
|
"autoGenerateTooltip": "Automatyczne uzupełnianie opisu asystenta na podstawie sugestii",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "Carregando página de
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) Carregando página de conversa...",
|
14
|
+
"initAuth": "(2/4) Inicializando o serviço de autenticação...",
|
15
|
+
"initUser": "(3/4) Inicializando o estado do usuário...",
|
16
|
+
"initializing": "(1/4) Iniciando aplicativo..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "Auto completar",
|
17
19
|
"autoGenerateTooltip": "Auto completar descrição do assistente com base em sugestões",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "Загрузка страницы чата...",
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) Загрузка страницы чата...",
|
14
|
+
"initAuth": "(2/4) Инициализация службы аутентификации...",
|
15
|
+
"initUser": "(3/4) Инициализация состояния пользователя...",
|
16
|
+
"initializing": "(1/4) Запуск приложения..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "Автозаполнение",
|
17
19
|
"autoGenerateTooltip": "Автоматическое дополнение описания агента на основе подсказок",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "Sohbet sayfası yükleniyor...",
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) Sohbet sayfası yükleniyor...",
|
14
|
+
"initAuth": "(2/4) Kimlik doğrulama hizmeti başlatılıyor...",
|
15
|
+
"initUser": "(3/4) Kullanıcı durumu başlatılıyor...",
|
16
|
+
"initializing": "(1/4) Uygulama başlatılıyor..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "Otomatik Oluştur",
|
17
19
|
"autoGenerateTooltip": "Auto-generate agent description based on prompts",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "Đang tải trang trò chuyện...",
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) Đang tải trang trò chuyện...",
|
14
|
+
"initAuth": "(2/4) Đang khởi tạo dịch vụ xác thực...",
|
15
|
+
"initUser": "(3/4) Đang khởi tạo trạng thái người dùng...",
|
16
|
+
"initializing": "(1/4) Đang khởi động ứng dụng..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "Tự động tạo",
|
17
19
|
"autoGenerateTooltip": "Tự động hoàn thành mô tả trợ lý dựa trên từ gợi ý",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "对话页面加载中...",
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) 对话页面加载中...",
|
14
|
+
"initAuth": "(2/4) 鉴权服务初始化...",
|
15
|
+
"initUser": "(3/4) 用户状态初始化...",
|
16
|
+
"initializing": "(1/4) 应用启动中..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "自动补全",
|
17
19
|
"autoGenerateTooltip": "基于提示词自动补全助手描述",
|
@@ -10,8 +10,10 @@
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
"appLoading": {
|
13
|
-
"goToChat": "對話頁面加載中...",
|
14
|
-
"
|
13
|
+
"goToChat": "(4/4) 對話頁面加載中...",
|
14
|
+
"initAuth": "(2/4) 鑑權服務初始化...",
|
15
|
+
"initUser": "(3/4) 使用者狀態初始化...",
|
16
|
+
"initializing": "(1/4) 應用啟動中..."
|
15
17
|
},
|
16
18
|
"autoGenerate": "自動生成",
|
17
19
|
"autoGenerateTooltip": "基於提示詞自動生成助手描述",
|
package/next.config.mjs
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.36.
|
3
|
+
"version": "1.36.30",
|
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",
|
@@ -3,12 +3,15 @@ import { useTranslation } from 'react-i18next';
|
|
3
3
|
|
4
4
|
import FullscreenLoading from '@/components/FullscreenLoading';
|
5
5
|
|
6
|
-
|
6
|
+
import { AppLoadingStage } from './type';
|
7
|
+
|
8
|
+
interface ContentProps {
|
9
|
+
loadingStage: AppLoadingStage;
|
10
|
+
}
|
11
|
+
const Content = memo<ContentProps>(({ loadingStage }) => {
|
7
12
|
const { t } = useTranslation('common');
|
8
13
|
|
9
|
-
return (
|
10
|
-
<FullscreenLoading title={goToChat ? t('appLoading.goToChat') : t('appLoading.initializing')} />
|
11
|
-
);
|
14
|
+
return <FullscreenLoading title={t(`appLoading.${loadingStage}`)} />;
|
12
15
|
});
|
13
16
|
|
14
17
|
export default Content;
|
@@ -8,11 +8,13 @@ import { systemStatusSelectors } from '@/store/global/selectors';
|
|
8
8
|
import { useUserStore } from '@/store/user';
|
9
9
|
import { authSelectors } from '@/store/user/selectors';
|
10
10
|
|
11
|
+
import { AppLoadingStage } from './type';
|
12
|
+
|
11
13
|
interface RedirectProps {
|
12
|
-
|
14
|
+
setLoadingStage: (value: AppLoadingStage) => void;
|
13
15
|
}
|
14
16
|
|
15
|
-
const Redirect = memo<RedirectProps>(({
|
17
|
+
const Redirect = memo<RedirectProps>(({ setLoadingStage }) => {
|
16
18
|
const router = useRouter();
|
17
19
|
const [isLogin, isLoaded, isUserStateInit, isOnboard] = useUserStore((s) => [
|
18
20
|
authSelectors.isLogin(s),
|
@@ -23,7 +25,7 @@ const Redirect = memo<RedirectProps>(({ setGoToChat }) => {
|
|
23
25
|
const isPgliteNotEnabled = useGlobalStore(systemStatusSelectors.isPgliteNotEnabled);
|
24
26
|
|
25
27
|
const navToChat = () => {
|
26
|
-
|
28
|
+
setLoadingStage(AppLoadingStage.GoToChat);
|
27
29
|
router.replace('/chat');
|
28
30
|
};
|
29
31
|
|
@@ -35,7 +37,10 @@ const Redirect = memo<RedirectProps>(({ setGoToChat }) => {
|
|
35
37
|
}
|
36
38
|
|
37
39
|
// if user auth state is not ready, wait for loading
|
38
|
-
if (!isLoaded)
|
40
|
+
if (!isLoaded) {
|
41
|
+
setLoadingStage(AppLoadingStage.InitAuth);
|
42
|
+
return;
|
43
|
+
}
|
39
44
|
|
40
45
|
// this mean user is definitely not login
|
41
46
|
if (!isLogin) {
|
@@ -44,7 +49,10 @@ const Redirect = memo<RedirectProps>(({ setGoToChat }) => {
|
|
44
49
|
}
|
45
50
|
|
46
51
|
// if user state not init, wait for loading
|
47
|
-
if (!isUserStateInit)
|
52
|
+
if (!isUserStateInit) {
|
53
|
+
setLoadingStage(AppLoadingStage.InitUser);
|
54
|
+
return;
|
55
|
+
}
|
48
56
|
|
49
57
|
// user need to onboard
|
50
58
|
if (!isOnboard) {
|
@@ -2,15 +2,17 @@
|
|
2
2
|
|
3
3
|
import { useState } from 'react';
|
4
4
|
|
5
|
+
import { AppLoadingStage } from '@/app/loading/type';
|
6
|
+
|
5
7
|
import Client from './Content';
|
6
8
|
import Redirect from './Redirect';
|
7
9
|
|
8
10
|
const ScreenLoading = () => {
|
9
|
-
const [
|
11
|
+
const [loadingStage, setLoadingStage] = useState(AppLoadingStage.Initializing);
|
10
12
|
return (
|
11
13
|
<>
|
12
|
-
<Client
|
13
|
-
<Redirect
|
14
|
+
<Client loadingStage={loadingStage} />
|
15
|
+
<Redirect setLoadingStage={setLoadingStage} />
|
14
16
|
</>
|
15
17
|
);
|
16
18
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { Icon } from '@lobehub/ui';
|
2
2
|
import { Loader2 } from 'lucide-react';
|
3
|
-
import { memo } from 'react';
|
3
|
+
import { ReactNode, memo } from 'react';
|
4
4
|
import { Center, Flexbox } from 'react-layout-kit';
|
5
5
|
|
6
6
|
import { ProductLogo } from '@/components/Branding';
|
7
7
|
|
8
|
-
const FullscreenLoading = memo<{ title?:
|
8
|
+
const FullscreenLoading = memo<{ title?: ReactNode }>(({ title }) => {
|
9
9
|
return (
|
10
10
|
<Flexbox height={'100%'} style={{ position: 'relative', userSelect: 'none' }} width={'100%'}>
|
11
11
|
<Center flex={1} gap={16} width={'100%'}>
|
@@ -25,6 +25,9 @@ import StoreInitialization from './StoreInitialization';
|
|
25
25
|
import StyleRegistry from './StyleRegistry';
|
26
26
|
|
27
27
|
const parserFallbackLang = async () => {
|
28
|
+
// if the default language is not 'en-US', just return the default language as fallback lang
|
29
|
+
if (DEFAULT_LANG !== 'en-US') return DEFAULT_LANG;
|
30
|
+
|
28
31
|
const header = await headers();
|
29
32
|
/**
|
30
33
|
* The arguments are as follows:
|
@@ -11,8 +11,10 @@ export default {
|
|
11
11
|
},
|
12
12
|
},
|
13
13
|
appLoading: {
|
14
|
-
goToChat: '对话页面加载中...',
|
15
|
-
|
14
|
+
goToChat: '(4/4) 对话页面加载中...',
|
15
|
+
initAuth: '(2/4) 鉴权服务初始化...',
|
16
|
+
initUser: '(3/4) 用户状态初始化...',
|
17
|
+
initializing: '(1/4) 应用启动中...',
|
16
18
|
},
|
17
19
|
autoGenerate: '自动补全',
|
18
20
|
autoGenerateTooltip: '基于提示词自动补全助手描述',
|