@lobehub/chat 1.11.5 → 1.11.7

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,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.11.7](https://github.com/lobehub/lobe-chat/compare/v1.11.6...v1.11.7)
6
+
7
+ <sup>Released on **2024-08-18**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix topic scroll issue.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix topic scroll issue, closes [#3505](https://github.com/lobehub/lobe-chat/issues/3505) ([c719c7a](https://github.com/lobehub/lobe-chat/commit/c719c7a))
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
+
30
+ ### [Version 1.11.6](https://github.com/lobehub/lobe-chat/compare/v1.11.5...v1.11.6)
31
+
32
+ <sup>Released on **2024-08-18**</sup>
33
+
34
+ #### ♻ Code Refactoring
35
+
36
+ - **misc**: Refactor the `SITE_URL` to `APP_URL`.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Code refactoring
44
+
45
+ - **misc**: Refactor the `SITE_URL` to `APP_URL`, closes [#3504](https://github.com/lobehub/lobe-chat/issues/3504) ([46bdcea](https://github.com/lobehub/lobe-chat/commit/46bdcea))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 1.11.5](https://github.com/lobehub/lobe-chat/compare/v1.11.4...v1.11.5)
6
56
 
7
57
  <sup>Released on **2024-08-18**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.11.5",
3
+ "version": "1.11.7",
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",
@@ -15,7 +15,7 @@ import { useSessionStore } from '@/store/session';
15
15
  import { useUserStore } from '@/store/user';
16
16
  import { ChatTopic } from '@/types/topic';
17
17
 
18
- import { Placeholder, SkeletonList } from '../SkeletonList';
18
+ import { SkeletonList } from '../SkeletonList';
19
19
  import TopicItem from './TopicItem';
20
20
 
21
21
  const TopicListContent = memo(() => {
@@ -85,7 +85,7 @@ const TopicListContent = memo(() => {
85
85
  </Flexbox>
86
86
  )}
87
87
  <Virtuoso
88
- components={{ ScrollSeekPlaceholder: Placeholder }}
88
+ // components={{ ScrollSeekPlaceholder: Placeholder }}
89
89
  computeItemKey={(_, item) => item.id}
90
90
  data={topics}
91
91
  fixedItemHeight={44}
@@ -93,10 +93,10 @@ const TopicListContent = memo(() => {
93
93
  itemContent={itemContent}
94
94
  overscan={44 * 10}
95
95
  ref={virtuosoRef}
96
- scrollSeekConfiguration={{
97
- enter: (velocity) => Math.abs(velocity) > 350,
98
- exit: (velocity) => Math.abs(velocity) < 10,
99
- }}
96
+ // scrollSeekConfiguration={{
97
+ // enter: (velocity) => Math.abs(velocity) > 350,
98
+ // exit: (velocity) => Math.abs(velocity) < 10,
99
+ // }}
100
100
  />
101
101
  </>
102
102
  );
@@ -1,12 +1,11 @@
1
1
  import { Metadata } from 'next';
2
2
 
3
- import { appEnv, getAppConfig } from '@/config/app';
3
+ import { appEnv } from '@/config/app';
4
4
  import { OFFICIAL_URL, OG_URL } from '@/const/url';
5
5
  import { translation } from '@/server/translation';
6
6
 
7
7
  const title = 'LobeChat';
8
8
 
9
- const { SITE_URL = OFFICIAL_URL } = getAppConfig();
10
9
  const BASE_PATH = appEnv.NEXT_PUBLIC_BASE_PATH;
11
10
 
12
11
  // if there is a base path, then we don't need the manifest
@@ -27,7 +26,7 @@ export const generateMetadata = async (): Promise<Metadata> => {
27
26
  shortcut: '/favicon-32x32.ico?v=1',
28
27
  },
29
28
  manifest: noManifest ? undefined : '/manifest.json',
30
- metadataBase: new URL(SITE_URL),
29
+ metadataBase: new URL(OFFICIAL_URL),
31
30
  openGraph: {
32
31
  description: t('chat.description'),
33
32
  images: [
package/src/config/app.ts CHANGED
@@ -30,7 +30,7 @@ export const getAppConfig = () => {
30
30
  PLUGINS_INDEX_URL: z.string().url(),
31
31
  PLUGIN_SETTINGS: z.string().optional(),
32
32
 
33
- SITE_URL: z.string().optional(),
33
+ APP_URL: z.string().optional(),
34
34
  },
35
35
  runtimeEnv: {
36
36
  NEXT_PUBLIC_BASE_PATH: process.env.NEXT_PUBLIC_BASE_PATH || '',
@@ -52,7 +52,7 @@ export const getAppConfig = () => {
52
52
  : 'https://chat-plugins.lobehub.com',
53
53
 
54
54
  PLUGIN_SETTINGS: process.env.PLUGIN_SETTINGS,
55
- SITE_URL: process.env.SITE_URL,
55
+ APP_URL: process.env.APP_URL,
56
56
  },
57
57
  });
58
58
  };
package/src/server/ld.ts CHANGED
@@ -1,11 +1,9 @@
1
1
  import urlJoin from 'url-join';
2
2
 
3
- import { getAppConfig } from '@/config/app';
4
3
  import { EMAIL_BUSINESS, EMAIL_SUPPORT, OFFICIAL_SITE, OFFICIAL_URL, X } from '@/const/url';
5
4
 
6
5
  import pkg from '../../package.json';
7
6
 
8
- const { SITE_URL = OFFICIAL_URL } = getAppConfig();
9
7
  const LAST_MODIFIED = new Date().toISOString();
10
8
  export const AUTHOR_LIST = {
11
9
  arvinxx: {
@@ -70,7 +68,7 @@ class Ld {
70
68
 
71
69
  genOrganization() {
72
70
  return {
73
- '@id': this.getId(SITE_URL, '#organization'),
71
+ '@id': this.getId(OFFICIAL_URL, '#organization'),
74
72
  '@type': 'Organization',
75
73
  'alternateName': 'LobeChat',
76
74
  'contactPoint': {
@@ -102,7 +100,7 @@ class Ld {
102
100
 
103
101
  getAuthors(ids: string[] = []) {
104
102
  const defaultAuthor = {
105
- '@id': this.getId(SITE_URL, '#organization'),
103
+ '@id': this.getId(OFFICIAL_URL, '#organization'),
106
104
  '@type': 'Organization',
107
105
  };
108
106
  if (!ids || ids.length === 0) return defaultAuthor;
@@ -142,7 +140,7 @@ class Ld {
142
140
  '@id': fixedUrl,
143
141
  '@type': 'WebPage',
144
142
  'about': {
145
- '@id': this.getId(SITE_URL, '#organization'),
143
+ '@id': this.getId(OFFICIAL_URL, '#organization'),
146
144
  },
147
145
  'breadcrumbs': {
148
146
  '@id': this.getId(fixedUrl, '#breadcrumb'),
@@ -155,7 +153,7 @@ class Ld {
155
153
  },
156
154
  'inLanguage': 'en-US',
157
155
  'isPartOf': {
158
- '@id': this.getId(SITE_URL, '#website'),
156
+ '@id': this.getId(OFFICIAL_URL, '#website'),
159
157
  },
160
158
  'name': this.fixTitle(title),
161
159
  'primaryImageOfPage': {
@@ -188,15 +186,15 @@ class Ld {
188
186
 
189
187
  genWebSite() {
190
188
  const baseInfo: any = {
191
- '@id': this.getId(SITE_URL, '#website'),
189
+ '@id': this.getId(OFFICIAL_URL, '#website'),
192
190
  '@type': 'WebSite',
193
191
  'description': pkg.description,
194
192
  'inLanguage': 'en-US',
195
193
  'name': 'LobeChat',
196
194
  'publisher': {
197
- '@id': this.getId(SITE_URL, '#organization'),
195
+ '@id': this.getId(OFFICIAL_URL, '#organization'),
198
196
  },
199
- 'url': SITE_URL,
197
+ 'url': OFFICIAL_URL,
200
198
  };
201
199
 
202
200
  return baseInfo;
@@ -211,7 +209,7 @@ class Ld {
211
209
  }
212
210
 
213
211
  private fixUrl(url: string) {
214
- return urlJoin(SITE_URL, url);
212
+ return urlJoin(OFFICIAL_URL, url);
215
213
  }
216
214
  }
217
215
 
@@ -9,6 +9,7 @@ export default defineConfig({
9
9
  coverage: {
10
10
  all: false,
11
11
  exclude: ['src/database/server/core/dbForTest.ts'],
12
+ include: ['src/database/server/**/*.ts'],
12
13
  provider: 'v8',
13
14
  reporter: ['text', 'json', 'lcov', 'text-summary'],
14
15
  reportsDirectory: './coverage/server',