@lobehub/chat 1.7.7 → 1.7.8
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/README.md +3 -3
- package/README.zh-CN.md +3 -3
- package/package.json +1 -1
- package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/ChatHeaderTitle.tsx +10 -1
- package/src/app/(main)/chat/@session/features/SessionListContent/CollapseGroup/Actions.tsx +5 -1
- package/src/app/(main)/settings/llm/components/ProviderModelList/CustomModelOption.tsx +19 -14
- package/src/app/(main)/settings/llm/components/ProviderModelList/ModelConfigModal/Form.tsx +4 -1
- package/src/components/ModelSelect/index.tsx +4 -1
- package/src/features/ModelSwitchPanel/index.tsx +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 1.7.8](https://github.com/lobehub/lobe-chat/compare/v1.7.7...v1.7.8)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-07-30**</sup>
|
|
8
|
+
|
|
9
|
+
#### 💄 Styles
|
|
10
|
+
|
|
11
|
+
- **ui**: Modify and repair UI layout.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Styles
|
|
19
|
+
|
|
20
|
+
- **ui**: Modify and repair UI layout, closes [#3321](https://github.com/lobehub/lobe-chat/issues/3321) ([cda776f](https://github.com/lobehub/lobe-chat/commit/cda776f))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
### [Version 1.7.7](https://github.com/lobehub/lobe-chat/compare/v1.7.6...v1.7.7)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2024-07-30**</sup>
|
package/README.md
CHANGED
|
@@ -268,12 +268,12 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
|
268
268
|
|
|
269
269
|
| Recent Submits | Description |
|
|
270
270
|
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
271
|
+
| [Code Snark Master](https://chat-preview.lobehub.com/market?agent=code-snark-master)<br/><sup>By **[leter](https://github.com/leter)** on **2024-07-29**</sup> | Specializes in sharp criticism of code, sarcastically pointing out inefficiencies and readability issues<br/>`tech-leadership` `code-review` `sarcastic-style` `programming-consultation` |
|
|
272
|
+
| [Unity Maestro](https://chat-preview.lobehub.com/market?agent=unity-maestro)<br/><sup>By **[thedivergentai](https://github.com/thedivergentai)** on **2024-07-29**</sup> | Expert Unity Game Development Companion<br/>`game-development` `unity` `software-engineering` |
|
|
271
273
|
| [C Program Learning Assistant](https://chat-preview.lobehub.com/market?agent=sichuan-university-941-c-programming-assistant)<br/><sup>By **[YBGuoYang](https://github.com/YBGuoYang)** on **2024-07-28**</sup> | Assist me in learning C program design<br/>`941` |
|
|
272
274
|
| [Brand Pioneer](https://chat-preview.lobehub.com/market?agent=brand-pioneer)<br/><sup>By **[SaintFresh](https://github.com/SaintFresh)** on **2024-07-25**</sup> | A brand development specialist, thought leader, brand strategy super-genius, and brand visionary. Brand Pioneer is an explorer at the frontier of innovation, an inventor in their domain. Provide them with your market and let them imagine a future world characterized by groundbreaking advancements in your field of expertise.<br/>`business` `brand-pioneer` `brand-development` `business-assistant` `brand-narrative` |
|
|
273
|
-
| [Network Security Assistant](https://chat-preview.lobehub.com/market?agent=cybersecurity-copilot)<br/><sup>By **[huoji120](https://github.com/huoji120)** on **2024-07-23**</sup> | A network security expert assistant that analyzes logs, code, decompiles, identifies issues, and provides optimization suggestions.<br/>`network-security` `traffic-analysis` `log-analysis` `code-reverse-engineering` `ctf` |
|
|
274
|
-
| [BIDOSx2](https://chat-preview.lobehub.com/market?agent=bidosx-2-v-2)<br/><sup>By **[SaintFresh](https://github.com/SaintFresh)** on **2024-07-21**</sup> | A highly advanced AI LLM transcending conventional AI. 'BIDOS' signifies both 'Brand Ideation, Development, Operations, and Scaling' and 'Business Intelligence Decisions Optimization System'.<br/>`brand-development` `ai-assistant` `market-analysis` `strategic-planning` `business-optimization` `business-intelligence` |
|
|
275
275
|
|
|
276
|
-
> 📊 Total agents: [<kbd>**
|
|
276
|
+
> 📊 Total agents: [<kbd>**309**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
277
277
|
|
|
278
278
|
<!-- AGENT LIST -->
|
|
279
279
|
|
package/README.zh-CN.md
CHANGED
|
@@ -256,12 +256,12 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
256
256
|
|
|
257
257
|
| 最近新增 | 助手说明 |
|
|
258
258
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
259
|
+
| [代码毒舌大师](https://chat-preview.lobehub.com/market?agent=code-snark-master)<br/><sup>By **[leter](https://github.com/leter)** on **2024-07-29**</sup> | 擅长尖刻批评代码,讽刺性地指出低效和可读性问题<br/>`技术领导` `代码审查` `讽刺风格` `编程咨询` |
|
|
260
|
+
| [Unity Maestro](https://chat-preview.lobehub.com/market?agent=unity-maestro)<br/><sup>By **[thedivergentai](https://github.com/thedivergentai)** on **2024-07-29**</sup> | Expert Unity Game Development Companion<br/>`game-development` `unity` `software-engineering` |
|
|
259
261
|
| [c 程序学习助手](https://chat-preview.lobehub.com/market?agent=sichuan-university-941-c-programming-assistant)<br/><sup>By **[YBGuoYang](https://github.com/YBGuoYang)** on **2024-07-28**</sup> | 辅助我进行 c 程序设计的学习<br/>`941` |
|
|
260
262
|
| [品牌先锋](https://chat-preview.lobehub.com/market?agent=brand-pioneer)<br/><sup>By **[SaintFresh](https://github.com/SaintFresh)** on **2024-07-25**</sup> | 一位品牌发展专家、思想领袖、品牌战略超级天才和品牌远见者。品牌先锋是创新前沿的探险家,在其领域是一位发明家。将您的市场提供给他们,让他们想象一个未来世界,其中以您的专业领域的突破性进展为特征。<br/>`商业` `品牌先锋` `品牌发展` `商业助手` `品牌叙事` |
|
|
261
|
-
| [网络安全助手](https://chat-preview.lobehub.com/market?agent=cybersecurity-copilot)<br/><sup>By **[huoji120](https://github.com/huoji120)** on **2024-07-23**</sup> | 网络安全专家助手,分析日志、代码、反编译,发现问题并提供优化建议。<br/>`网络安全` `流量分析` `日志分析` `代码逆向` `ctf` |
|
|
262
|
-
| [BIDOSx2](https://chat-preview.lobehub.com/market?agent=bidosx-2-v-2)<br/><sup>By **[SaintFresh](https://github.com/SaintFresh)** on **2024-07-21**</sup> | 一种高度先进的 AI LLM,超越传统人工智能。'BIDOS' 既代表 ' 品牌构思、发展、运营和扩展 ',也代表 ' 商业智能决策优化系统 '。<br/>`品牌发展` `ai助手` `市场分析` `战略规划` `业务优化` `商业智能` |
|
|
263
263
|
|
|
264
|
-
> 📊 Total agents: [<kbd>**
|
|
264
|
+
> 📊 Total agents: [<kbd>**309**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
265
265
|
|
|
266
266
|
<!-- AGENT LIST -->
|
|
267
267
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.8",
|
|
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",
|
|
@@ -43,7 +43,16 @@ const ChatHeaderTitle = memo(() => {
|
|
|
43
43
|
</Flexbox>
|
|
44
44
|
}
|
|
45
45
|
title={
|
|
46
|
-
<div
|
|
46
|
+
<div
|
|
47
|
+
onClick={() => toggleConfig()}
|
|
48
|
+
style={{
|
|
49
|
+
marginRight: '8px',
|
|
50
|
+
maxWidth: '64vw',
|
|
51
|
+
overflow: 'hidden',
|
|
52
|
+
textOverflow: 'ellipsis',
|
|
53
|
+
whiteSpace: 'nowrap',
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
47
56
|
{displayTitle}
|
|
48
57
|
{topicLength > 1 ? `(${topicLength + 1})` : ''}
|
|
49
58
|
</div>
|
|
@@ -5,6 +5,7 @@ import { MoreVertical, PencilLine, Plus, Settings2, Trash } from 'lucide-react';
|
|
|
5
5
|
import { memo, useMemo } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
|
|
8
|
+
import { useIsMobile } from '@/hooks/useIsMobile';
|
|
8
9
|
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
|
|
9
10
|
import { useSessionStore } from '@/store/session';
|
|
10
11
|
|
|
@@ -30,6 +31,8 @@ const Actions = memo<ActionsProps>(
|
|
|
30
31
|
const { styles } = useStyles();
|
|
31
32
|
const { modal, message } = App.useApp();
|
|
32
33
|
|
|
34
|
+
const isMobile = useIsMobile();
|
|
35
|
+
|
|
33
36
|
const [createSession, removeSessionGroup] = useSessionStore((s) => [
|
|
34
37
|
s.createSession,
|
|
35
38
|
s.removeSessionGroup,
|
|
@@ -123,12 +126,13 @@ const Actions = memo<ActionsProps>(
|
|
|
123
126
|
trigger={['click']}
|
|
124
127
|
>
|
|
125
128
|
<ActionIcon
|
|
129
|
+
active={isMobile ? true : false}
|
|
126
130
|
icon={MoreVertical}
|
|
127
131
|
onClick={(e) => {
|
|
128
132
|
e.stopPropagation();
|
|
129
133
|
}}
|
|
130
134
|
size={{ blockSize: 22, fontSize: 16 }}
|
|
131
|
-
style={{ marginRight: -8 }}
|
|
135
|
+
style={{ background: isMobile ? 'transparent' : '', marginRight: -8 }}
|
|
132
136
|
/>
|
|
133
137
|
</Dropdown>
|
|
134
138
|
);
|
|
@@ -9,7 +9,7 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
9
9
|
import ModelIcon from '@/components/ModelIcon';
|
|
10
10
|
import { ModelInfoTags } from '@/components/ModelSelect';
|
|
11
11
|
import { useUserStore } from '@/store/user';
|
|
12
|
-
import { modelConfigSelectors } from '@/store/user/selectors';
|
|
12
|
+
import { modelConfigSelectors, modelProviderSelectors } from '@/store/user/selectors';
|
|
13
13
|
import { GlobalLLMProviderKey } from '@/types/user/settings';
|
|
14
14
|
|
|
15
15
|
interface CustomModelOptionProps {
|
|
@@ -28,30 +28,34 @@ const CustomModelOption = memo<CustomModelOptionProps>(({ id, provider }) => {
|
|
|
28
28
|
s.toggleEditingCustomModelCard,
|
|
29
29
|
s.removeEnabledModels,
|
|
30
30
|
]);
|
|
31
|
+
|
|
31
32
|
const modelCard = useUserStore(
|
|
32
33
|
modelConfigSelectors.getCustomModelCard({ id, provider }),
|
|
33
34
|
isEqual,
|
|
34
35
|
);
|
|
35
36
|
|
|
37
|
+
const isEnabled = useUserStore(
|
|
38
|
+
(s) => modelProviderSelectors.getEnableModelsById(provider)(s)?.includes(id),
|
|
39
|
+
isEqual,
|
|
40
|
+
);
|
|
41
|
+
|
|
36
42
|
return (
|
|
37
43
|
<Flexbox align={'center'} distribution={'space-between'} gap={8} horizontal>
|
|
38
|
-
<Flexbox align={'center'} gap={8} horizontal>
|
|
44
|
+
<Flexbox align={'center'} gap={8} horizontal style={{ flex: 1, width: '70%' }}>
|
|
39
45
|
<ModelIcon model={id} size={32} />
|
|
40
|
-
<Flexbox>
|
|
46
|
+
<Flexbox direction={'vertical'} style={{ flex: 1, overflow: 'hidden' }}>
|
|
41
47
|
<Flexbox align={'center'} gap={8} horizontal>
|
|
42
|
-
{modelCard?.displayName || id}
|
|
48
|
+
<Typography.Text ellipsis>{modelCard?.displayName || id}</Typography.Text>
|
|
43
49
|
<ModelInfoTags id={id} {...modelCard} isCustom />
|
|
44
50
|
</Flexbox>
|
|
45
|
-
<Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
)}
|
|
54
|
-
</Flexbox>
|
|
51
|
+
<Typography.Text ellipsis style={{ fontSize: 12, marginTop: '4px' }} type={'secondary'}>
|
|
52
|
+
{id}
|
|
53
|
+
{!!modelCard?.deploymentName && (
|
|
54
|
+
<>
|
|
55
|
+
<Icon icon={LucideArrowRight} />
|
|
56
|
+
{modelCard?.deploymentName}
|
|
57
|
+
</>
|
|
58
|
+
)}
|
|
55
59
|
</Typography.Text>
|
|
56
60
|
</Flexbox>
|
|
57
61
|
</Flexbox>
|
|
@@ -83,6 +87,7 @@ const CustomModelOption = memo<CustomModelOptionProps>(({ id, provider }) => {
|
|
|
83
87
|
type: 'warning',
|
|
84
88
|
});
|
|
85
89
|
}}
|
|
90
|
+
style={isEnabled ? { marginRight: '10px' } : {}}
|
|
86
91
|
title={t('delete')}
|
|
87
92
|
/>
|
|
88
93
|
</Flexbox>
|
|
@@ -2,6 +2,7 @@ import { Checkbox, Form, FormInstance, Input } from 'antd';
|
|
|
2
2
|
import { memo, useEffect } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
|
|
5
|
+
import { useIsMobile } from '@/hooks/useIsMobile';
|
|
5
6
|
import { ChatModelCard } from '@/types/llm';
|
|
6
7
|
|
|
7
8
|
import MaxTokenSlider from './MaxTokenSlider';
|
|
@@ -18,6 +19,8 @@ const ModelConfigForm = memo<ModelConfigFormProps>(
|
|
|
18
19
|
|
|
19
20
|
const [formInstance] = Form.useForm();
|
|
20
21
|
|
|
22
|
+
const isMobile = useIsMobile();
|
|
23
|
+
|
|
21
24
|
useEffect(() => {
|
|
22
25
|
onFormInstanceReady(formInstance);
|
|
23
26
|
}, []);
|
|
@@ -37,7 +40,7 @@ const ModelConfigForm = memo<ModelConfigFormProps>(
|
|
|
37
40
|
initialValues={initialValues}
|
|
38
41
|
labelCol={{ span: 4 }}
|
|
39
42
|
style={{ marginTop: 16 }}
|
|
40
|
-
wrapperCol={{ offset: 1, span: 18 }}
|
|
43
|
+
wrapperCol={isMobile ? { span: 18 } : { offset: 1, span: 18 }}
|
|
41
44
|
>
|
|
42
45
|
<Form.Item
|
|
43
46
|
extra={t('llm.customModelCards.modelConfig.id.extra')}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Icon, Tooltip } from '@lobehub/ui';
|
|
2
|
+
import { Typography } from 'antd';
|
|
2
3
|
import { createStyles } from 'antd-style';
|
|
3
4
|
import { Infinity, LucideEye, LucidePaperclip, ToyBrick } from 'lucide-react';
|
|
4
5
|
import numeral from 'numeral';
|
|
@@ -142,7 +143,9 @@ export const ModelItemRender = memo<ModelItemRenderProps>(({ showInfoTag = true,
|
|
|
142
143
|
<Flexbox align={'center'} gap={32} horizontal justify={'space-between'}>
|
|
143
144
|
<Flexbox align={'center'} gap={8} horizontal>
|
|
144
145
|
<ModelIcon model={model.id} size={20} />
|
|
145
|
-
|
|
146
|
+
<Typography.Paragraph ellipsis={false} style={{ marginBottom: 0 }}>
|
|
147
|
+
{model.displayName || model.id}
|
|
148
|
+
</Typography.Paragraph>
|
|
146
149
|
</Flexbox>
|
|
147
150
|
|
|
148
151
|
{showInfoTag && <ModelInfoTags {...model} />}
|
|
@@ -10,6 +10,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
10
10
|
import { Flexbox } from 'react-layout-kit';
|
|
11
11
|
|
|
12
12
|
import { ModelItemRender, ProviderItemRender } from '@/components/ModelSelect';
|
|
13
|
+
import { useIsMobile } from '@/hooks/useIsMobile';
|
|
13
14
|
import { useAgentStore } from '@/store/agent';
|
|
14
15
|
import { agentSelectors } from '@/store/agent/slices/chat';
|
|
15
16
|
import { useUserStore } from '@/store/user';
|
|
@@ -49,7 +50,10 @@ const ModelSwitchPanel = memo<PropsWithChildren>(({ children }) => {
|
|
|
49
50
|
s.updateAgentConfig,
|
|
50
51
|
]);
|
|
51
52
|
|
|
53
|
+
const isMobile = useIsMobile();
|
|
54
|
+
|
|
52
55
|
const router = useRouter();
|
|
56
|
+
|
|
53
57
|
const enabledList = useUserStore(modelProviderSelectors.modelProviderListForModelSelect, isEqual);
|
|
54
58
|
|
|
55
59
|
const items = useMemo<ItemType[]>(() => {
|
|
@@ -102,7 +106,7 @@ const ModelSwitchPanel = memo<PropsWithChildren>(({ children }) => {
|
|
|
102
106
|
overflowY: 'scroll',
|
|
103
107
|
},
|
|
104
108
|
}}
|
|
105
|
-
placement={'topLeft'}
|
|
109
|
+
placement={isMobile ? 'top' : 'topLeft'}
|
|
106
110
|
trigger={['click']}
|
|
107
111
|
>
|
|
108
112
|
<div className={styles.tag}>{children}</div>
|