@lobehub/chat 0.159.1 → 0.159.3
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 0.159.3](https://github.com/lobehub/lobe-chat/compare/v0.159.2...v0.159.3)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-05-14**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix DeepSeek using wrong model ID.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix DeepSeek using wrong model ID, closes [#2484](https://github.com/lobehub/lobe-chat/issues/2484) ([465dbfc](https://github.com/lobehub/lobe-chat/commit/465dbfc))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.159.2](https://github.com/lobehub/lobe-chat/compare/v0.159.1...v0.159.2)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-05-14**</sup>
|
|
33
|
+
|
|
34
|
+
#### 🐛 Bug Fixes
|
|
35
|
+
|
|
36
|
+
- **misc**: Dragging text mistakenly as image.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's fixed
|
|
44
|
+
|
|
45
|
+
- **misc**: Dragging text mistakenly as image, closes [#2111](https://github.com/lobehub/lobe-chat/issues/2111) ([3c047ef](https://github.com/lobehub/lobe-chat/commit/3c047ef))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 0.159.1](https://github.com/lobehub/lobe-chat/compare/v0.159.0...v0.159.1)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2024-05-14**</sup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.159.
|
|
3
|
+
"version": "0.159.3",
|
|
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",
|
|
@@ -61,7 +61,12 @@ const useStyles = createStyles(({ css, token, stylish }) => {
|
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
const handleDragOver = (e: DragEvent) => {
|
|
64
|
-
e.
|
|
64
|
+
if (!e.dataTransfer?.items || e.dataTransfer.items.length === 0) return;
|
|
65
|
+
|
|
66
|
+
const isFile = e.dataTransfer.types.includes('Files');
|
|
67
|
+
if (isFile) {
|
|
68
|
+
e.preventDefault();
|
|
69
|
+
}
|
|
65
70
|
};
|
|
66
71
|
|
|
67
72
|
const DragUpload = memo(() => {
|
|
@@ -92,43 +97,55 @@ const DragUpload = memo(() => {
|
|
|
92
97
|
};
|
|
93
98
|
|
|
94
99
|
const handleDragEnter = (e: DragEvent) => {
|
|
95
|
-
e.
|
|
100
|
+
if (!e.dataTransfer?.items || e.dataTransfer.items.length === 0) return;
|
|
96
101
|
|
|
97
|
-
|
|
98
|
-
if (
|
|
102
|
+
const isFile = e.dataTransfer.types.includes('Files');
|
|
103
|
+
if (isFile) {
|
|
104
|
+
dragCounter.current += 1;
|
|
105
|
+
e.preventDefault();
|
|
99
106
|
setIsDragging(true);
|
|
100
107
|
}
|
|
101
108
|
};
|
|
102
109
|
|
|
103
110
|
const handleDragLeave = (e: DragEvent) => {
|
|
104
|
-
e.
|
|
111
|
+
if (!e.dataTransfer?.items || e.dataTransfer.items.length === 0) return;
|
|
105
112
|
|
|
106
|
-
|
|
107
|
-
|
|
113
|
+
const isFile = e.dataTransfer.types.includes('Files');
|
|
114
|
+
if (isFile) {
|
|
115
|
+
e.preventDefault();
|
|
108
116
|
|
|
109
|
-
|
|
110
|
-
|
|
117
|
+
// reset counter
|
|
118
|
+
dragCounter.current -= 1;
|
|
119
|
+
|
|
120
|
+
if (dragCounter.current === 0) {
|
|
121
|
+
setIsDragging(false);
|
|
122
|
+
}
|
|
111
123
|
}
|
|
112
124
|
};
|
|
113
125
|
|
|
114
126
|
const handleDrop = async (e: DragEvent) => {
|
|
115
|
-
e.
|
|
116
|
-
// reset counter
|
|
117
|
-
dragCounter.current = 0;
|
|
127
|
+
if (!e.dataTransfer?.items || e.dataTransfer.items.length === 0) return;
|
|
118
128
|
|
|
119
|
-
|
|
129
|
+
const isFile = e.dataTransfer.types.includes('Files');
|
|
130
|
+
if (isFile) {
|
|
131
|
+
e.preventDefault();
|
|
120
132
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const files = e.dataTransfer?.files;
|
|
133
|
+
// reset counter
|
|
134
|
+
dragCounter.current = 0;
|
|
124
135
|
|
|
125
|
-
|
|
126
|
-
|
|
136
|
+
setIsDragging(false);
|
|
137
|
+
|
|
138
|
+
// get filesList
|
|
139
|
+
// TODO: support folder files upload
|
|
140
|
+
const files = e.dataTransfer?.files;
|
|
141
|
+
|
|
142
|
+
// upload files
|
|
143
|
+
uploadImages(files);
|
|
144
|
+
}
|
|
127
145
|
};
|
|
128
146
|
|
|
129
147
|
const handlePaste = (event: ClipboardEvent) => {
|
|
130
148
|
// get files from clipboard
|
|
131
|
-
|
|
132
149
|
const files = event.clipboardData?.files;
|
|
133
150
|
|
|
134
151
|
uploadImages(files);
|
|
@@ -10,7 +10,7 @@ import ProviderConfig from '../components/ProviderConfig';
|
|
|
10
10
|
const DeepSeekProvider = memo(() => {
|
|
11
11
|
return (
|
|
12
12
|
<ProviderConfig
|
|
13
|
-
checkModel={'deepseek
|
|
13
|
+
checkModel={'deepseek-chat'}
|
|
14
14
|
modelList={{ showModelFetcher: true }}
|
|
15
15
|
provider={ModelProvider.DeepSeek}
|
|
16
16
|
title={<DeepSeek.Combine size={28} type={'color'} />}
|
|
@@ -139,7 +139,9 @@ const getLlmOptionsFromPayload = (provider: string, payload: JWTPayload) => {
|
|
|
139
139
|
}
|
|
140
140
|
case ModelProvider.DeepSeek: {
|
|
141
141
|
const { DEEPSEEK_API_KEY } = getServerConfig();
|
|
142
|
+
|
|
142
143
|
const apiKey = apiKeyManager.pick(payload?.apiKey || DEEPSEEK_API_KEY);
|
|
144
|
+
|
|
143
145
|
return { apiKey };
|
|
144
146
|
}
|
|
145
147
|
case ModelProvider.TogetherAI: {
|