@lobehub/chat 0.145.9 → 0.145.10

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,23 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.145.10](https://github.com/lobehub/lobe-chat/compare/v0.145.9...v0.145.10)
6
+
7
+ <sup>Released on **2024-04-02**</sup>
8
+
9
+ <br/>
10
+
11
+ <details>
12
+ <summary><kbd>Improvements and Fixes</kbd></summary>
13
+
14
+ </details>
15
+
16
+ <div align="right">
17
+
18
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
19
+
20
+ </div>
21
+
5
22
  ### [Version 0.145.9](https://github.com/lobehub/lobe-chat/compare/v0.145.8...v0.145.9)
6
23
 
7
24
  <sup>Released on **2024-04-02**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.145.9",
3
+ "version": "0.145.10",
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",
@@ -52,11 +52,7 @@ const AgentCard = memo<AgentCardProps>(({ CardRender, mobile }) => {
52
52
  <div className={styles.subTitle}>{t('title.recentSubmits')}</div>
53
53
  <CardRender items={agentList.slice(0, 3)} renderItem={GridRender} />
54
54
  <div className={styles.subTitle}>{t('title.allAgents')}</div>
55
- <CardRender
56
- items={agentList.slice(3)}
57
- renderItem={GridRender}
58
- spotlight={mobile ? undefined : false}
59
- />
55
+ <CardRender items={agentList.slice(3)} renderItem={GridRender} />
60
56
  </>
61
57
  )}
62
58
  </Flexbox>
@@ -3,9 +3,10 @@ import { Empty } from 'antd';
3
3
  import { useResponsive } from 'antd-style';
4
4
  import isEqual from 'fast-deep-equal';
5
5
  import { ServerCrash } from 'lucide-react';
6
- import { memo, useState } from 'react';
6
+ import { memo, useMemo, useState } from 'react';
7
7
  import { useTranslation } from 'react-i18next';
8
8
  import { Center, Flexbox } from 'react-layout-kit';
9
+ import { Virtuoso } from 'react-virtuoso';
9
10
 
10
11
  import AddPluginButton from '@/features/PluginStore/AddPluginButton';
11
12
  import { useToolStore } from '@/store/tool';
@@ -31,6 +32,18 @@ export const OnlineList = memo(() => {
31
32
 
32
33
  const isEmpty = pluginStoreList.length === 0;
33
34
 
35
+ const filteredPluginList = useMemo(
36
+ () =>
37
+ pluginStoreList.filter((item) =>
38
+ [item.meta?.title, item.meta?.description, item.author, ...(item.meta?.tags || [])]
39
+ .filter(Boolean)
40
+ .join('')
41
+ .toLowerCase()
42
+ .includes((keywords || '')?.toLowerCase()),
43
+ ),
44
+ [pluginStoreList, keywords],
45
+ );
46
+
34
47
  return (
35
48
  <>
36
49
  <Flexbox align={'center'} gap={8} horizontal justify={'space-between'}>
@@ -60,19 +73,20 @@ export const OnlineList = memo(() => {
60
73
  )}
61
74
  </Center>
62
75
  ) : (
63
- <Flexbox gap={24}>
64
- {pluginStoreList
65
- .filter((item) =>
66
- [item.meta?.title, item.meta?.description, item.author, ...(item.meta?.tags || [])]
67
- .filter(Boolean)
68
- .join('')
69
- .toLowerCase()
70
- .includes((keywords || '')?.toLowerCase()),
71
- )
72
- .map((item) => (
73
- <PluginItem key={item.identifier} {...item} />
74
- ))}
75
- </Flexbox>
76
+ <Virtuoso
77
+ itemContent={(index) => {
78
+ const item = filteredPluginList[index];
79
+
80
+ return (
81
+ <Flexbox key={item.identifier} paddingBlock={12}>
82
+ <PluginItem {...item} />
83
+ </Flexbox>
84
+ );
85
+ }}
86
+ overscan={400}
87
+ style={{ height: 500 }}
88
+ totalCount={filteredPluginList.length}
89
+ />
76
90
  )}
77
91
  </>
78
92
  );
@@ -1,6 +1,6 @@
1
- import { css } from 'antd-style';
1
+ import { Theme, css } from 'antd-style';
2
2
 
3
- export default ({ prefixCls }: { prefixCls: string }) => css`
3
+ export default ({ prefixCls, token }: { prefixCls: string; token: Theme }) => css`
4
4
  html,
5
5
  body,
6
6
  #__next,
@@ -12,6 +12,7 @@ export default ({ prefixCls }: { prefixCls: string }) => css`
12
12
  }
13
13
 
14
14
  * {
15
+ scrollbar-color: ${token.colorFill} transparent;
15
16
  scrollbar-width: thin;
16
17
  }
17
18
 
@@ -6,6 +6,6 @@ import global from './global';
6
6
  const prefixCls = 'ant';
7
7
 
8
8
  export const GlobalStyle = createGlobalStyle(({ theme }) => [
9
- global({ prefixCls }),
9
+ global({ prefixCls, token: theme }),
10
10
  antdOverride({ prefixCls, token: theme }),
11
11
  ]);