@lobehub/chat 0.72.3 → 0.72.4

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 CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.72.4](https://github.com/lobehub/lobe-chat/compare/v0.72.3...v0.72.4)
6
+
7
+ <sup>Released on **2023-09-10**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Use en-US when no suit lang with plugin index.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Use en-US when no suit lang with plugin index ([4e9668d](https://github.com/lobehub/lobe-chat/commit/4e9668d))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ### [Version 0.72.3](https://github.com/lobehub/lobe-chat/compare/v0.72.2...v0.72.3)
6
31
 
7
32
  <sup>Released on **2023-09-09**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.72.3",
3
+ "version": "0.72.4",
4
4
  "description": "Lobe Chat is an open-source chatbot client using Vercel AI SDK, Typescript and Next.js",
5
5
  "keywords": [
6
6
  "chatbot",
package/src/const/url.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { localeOptions } from '@/locales/options';
1
2
  import { Locales } from '@/locales/resources';
2
3
 
3
4
  import pkg from '../../package.json';
@@ -13,7 +14,7 @@ export const PLUGINS_INDEX_URL =
13
14
  process.env.PLUGINS_INDEX_URL ?? 'https://chat-plugins.lobehub.com/index';
14
15
 
15
16
  export const getPluginIndexJSON = (lang: Locales = 'en-US', baseUrl = PLUGINS_INDEX_URL) => {
16
- if (lang === 'en-US') return baseUrl;
17
+ if (lang === 'en-US' || !localeOptions.map((o) => o.value).includes(lang)) return baseUrl;
17
18
 
18
19
  return `${baseUrl}.${lang}.json`;
19
20
  };
@@ -7,7 +7,7 @@ type LocaleOptions = SelectProps['options'] &
7
7
  value: Locales;
8
8
  }[];
9
9
 
10
- export const options: LocaleOptions = [
10
+ export const localeOptions: LocaleOptions = [
11
11
  {
12
12
  label: '简体中文',
13
13
  value: 'zh-CN',
@@ -11,7 +11,7 @@ import SelectWithImg from '@/components/SelectWithImg';
11
11
  import { FORM_STYLE } from '@/const/layoutTokens';
12
12
  import { DEFAULT_SETTINGS } from '@/const/settings';
13
13
  import AvatarWithUpload from '@/features/AvatarWithUpload';
14
- import { options } from '@/locales/options';
14
+ import { localeOptions } from '@/locales/options';
15
15
  import { globalSelectors, useGlobalStore } from '@/store/global';
16
16
  import { useSessionStore } from '@/store/session';
17
17
  import { ConfigKeys } from '@/types/settings';
@@ -113,7 +113,7 @@ const Common = memo(() => {
113
113
  onChange={(e) => {
114
114
  changeLanguage(e);
115
115
  }}
116
- options={options}
116
+ options={localeOptions}
117
117
  />
118
118
  ),
119
119
  label: t('settingTheme.lang.title'),