@lobehub/chat 0.147.10 → 0.147.11
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.147.11](https://github.com/lobehub/lobe-chat/compare/v0.147.10...v0.147.11)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-04-14**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Support drag or copy to upload file by model ability.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Support drag or copy to upload file by model ability, closes [#2016](https://github.com/lobehub/lobe-chat/issues/2016) ([2abe37e](https://github.com/lobehub/lobe-chat/commit/2abe37e))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
### [Version 0.147.10](https://github.com/lobehub/lobe-chat/compare/v0.147.9...v0.147.10)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2024-04-13**</sup>
|
package/README.md
CHANGED
|
@@ -260,14 +260,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
|
260
260
|
|
|
261
261
|
<!-- AGENT LIST -->
|
|
262
262
|
|
|
263
|
-
| Recent Submits | Description
|
|
264
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
265
|
-
| [
|
|
266
|
-
| [
|
|
267
|
-
| [
|
|
268
|
-
| [
|
|
269
|
-
|
|
270
|
-
> 📊 Total agents: [<kbd>**
|
|
263
|
+
| Recent Submits | Description |
|
|
264
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
265
|
+
| [Biology Professor](https://chat-preview.lobehub.com/market?agent=bio-professor)<br/><sup>By **[luxiangze](https://github.com/luxiangze)** on **2024-04-13**</sup> | As a biology professor, you will receive questions and concepts about biology. Please explain these questions and concepts in specific and concise language, and try to use practical examples to illustrate them to help your audience better understand. Please ensure that your explanations are accurate and clear, and try to encourage creative and flexible answers. Respond in Chinese.<br/>`biology` |
|
|
266
|
+
| [Master of Fortune Telling](https://chat-preview.lobehub.com/market?agent=fortune-teller)<br/><sup>By **[kamilkenrich](https://github.com/kamilkenrich)** on **2024-04-13**</sup> | Specializes in numerology, divination, astrology, and blood type analysis<br/>`numerology` `divination` `astrology` `psychology` `blood-type` `constellation` |
|
|
267
|
+
| [Healthy Recipe Recommender](https://chat-preview.lobehub.com/market?agent=healthy-recipe-recommender)<br/><sup>By **[Greasen](https://github.com/Greasen)** on **2024-04-11**</sup> | Customized nutrition meals, scientific combinations, healthy eating, your personal nutritionist.<br/>`recipes` `fitness-meals` `nutrition-meals` |
|
|
268
|
+
| [SmartWeather Assistant](https://chat-preview.lobehub.com/market?agent=personal-weather-consultant)<br/><sup>By **[Greasen](https://github.com/Greasen)** on **2024-04-11**</sup> | SmartWeather Assistant, your personal weather advisor, fashion guide, and positive energy booster!<br/>`weather` `assistant` `fashion` |
|
|
269
|
+
|
|
270
|
+
> 📊 Total agents: [<kbd>**238**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
271
271
|
|
|
272
272
|
<!-- AGENT LIST -->
|
|
273
273
|
|
package/README.zh-CN.md
CHANGED
|
@@ -248,14 +248,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
248
248
|
|
|
249
249
|
<!-- AGENT LIST -->
|
|
250
250
|
|
|
251
|
-
| 最近新增 | 助手说明
|
|
252
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
253
|
-
| [
|
|
254
|
-
| [
|
|
255
|
-
| [
|
|
256
|
-
| [
|
|
257
|
-
|
|
258
|
-
> 📊 Total agents: [<kbd>**
|
|
251
|
+
| 最近新增 | 助手说明 |
|
|
252
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
253
|
+
| [生物学教授](https://chat-preview.lobehub.com/market?agent=bio-professor)<br/><sup>By **[luxiangze](https://github.com/luxiangze)** on **2024-04-13**</sup> | 作为一位生物学教授,您将收到关于生物学的问题和概念,请用具体而简明的语言解释这些问题和概念,并尽量使用实际例子进行说明,以帮助您的听众更好地理解。请确保您的解释准确而清晰,并试图鼓励创造性和灵活性的答案。用中文回答<br/>`生物` |
|
|
254
|
+
| [命理大师](https://chat-preview.lobehub.com/market?agent=fortune-teller)<br/><sup>By **[kamilkenrich](https://github.com/kamilkenrich)** on **2024-04-13**</sup> | 擅长命理学、占卜预测、占星术和血型学分析<br/>`命理学、占卜、占星学、心理学、血型、星座` |
|
|
255
|
+
| [健康食谱推荐师](https://chat-preview.lobehub.com/market?agent=healthy-recipe-recommender)<br/><sup>By **[Greasen](https://github.com/Greasen)** on **2024-04-11**</sup> | 精准定制营养餐,科学搭配,健康饮食,你的私人营养师。<br/>`食谱、健身餐、营养餐` |
|
|
256
|
+
| [智预小助手](https://chat-preview.lobehub.com/market?agent=personal-weather-consultant)<br/><sup>By **[Greasen](https://github.com/Greasen)** on **2024-04-11**</sup> | 智预小助手,您的私人天气顾问,穿搭指南,正能量加油器!<br/>`天气` `助理、穿搭` |
|
|
257
|
+
|
|
258
|
+
> 📊 Total agents: [<kbd>**238**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
259
259
|
|
|
260
260
|
<!-- AGENT LIST -->
|
|
261
261
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.147.
|
|
3
|
+
"version": "0.147.11",
|
|
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",
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"@next/eslint-plugin-next": "^14.1.4",
|
|
173
173
|
"@peculiar/webcrypto": "^1.4.6",
|
|
174
174
|
"@testing-library/jest-dom": "^6.4.2",
|
|
175
|
-
"@testing-library/react": "^
|
|
175
|
+
"@testing-library/react": "^15.0.0",
|
|
176
176
|
"@types/chroma-js": "^2.4.4",
|
|
177
177
|
"@types/debug": "^4.1.12",
|
|
178
178
|
"@types/diff": "^5.0.9",
|
|
@@ -7,6 +7,10 @@ import { useTranslation } from 'react-i18next';
|
|
|
7
7
|
import { Center, Flexbox } from 'react-layout-kit';
|
|
8
8
|
|
|
9
9
|
import { useFileStore } from '@/store/file';
|
|
10
|
+
import { useGlobalStore } from '@/store/global';
|
|
11
|
+
import { modelProviderSelectors } from '@/store/global/selectors';
|
|
12
|
+
import { useSessionStore } from '@/store/session';
|
|
13
|
+
import { agentSelectors } from '@/store/session/selectors';
|
|
10
14
|
|
|
11
15
|
const useStyles = createStyles(({ css, token, stylish }) => {
|
|
12
16
|
return {
|
|
@@ -56,6 +60,8 @@ const useStyles = createStyles(({ css, token, stylish }) => {
|
|
|
56
60
|
};
|
|
57
61
|
});
|
|
58
62
|
|
|
63
|
+
|
|
64
|
+
|
|
59
65
|
const handleDragOver = (e: DragEvent) => {
|
|
60
66
|
e.preventDefault();
|
|
61
67
|
};
|
|
@@ -71,12 +77,16 @@ const DragUpload = memo(() => {
|
|
|
71
77
|
|
|
72
78
|
const uploadFile = useFileStore((s) => s.uploadFile);
|
|
73
79
|
|
|
80
|
+
const model = useSessionStore(agentSelectors.currentAgentModel);
|
|
81
|
+
|
|
82
|
+
const enabledFiles = useGlobalStore(modelProviderSelectors.isModelEnabledFiles(model));
|
|
83
|
+
|
|
74
84
|
const uploadImages = async (fileList: FileList | undefined) => {
|
|
75
85
|
if (!fileList || fileList.length === 0) return;
|
|
76
86
|
|
|
77
87
|
const pools = Array.from(fileList).map(async (file) => {
|
|
78
88
|
// skip none-file items
|
|
79
|
-
if (!file.type.startsWith('image')) return;
|
|
89
|
+
if (!file.type.startsWith('image') && !enabledFiles) return;
|
|
80
90
|
await uploadFile(file);
|
|
81
91
|
});
|
|
82
92
|
|
|
@@ -126,6 +136,7 @@ const DragUpload = memo(() => {
|
|
|
126
136
|
uploadImages(files);
|
|
127
137
|
};
|
|
128
138
|
|
|
139
|
+
|
|
129
140
|
useEffect(() => {
|
|
130
141
|
window.addEventListener('dragenter', handleDragEnter);
|
|
131
142
|
window.addEventListener('dragover', handleDragOver);
|
|
@@ -140,7 +151,7 @@ const DragUpload = memo(() => {
|
|
|
140
151
|
window.removeEventListener('drop', handleDrop);
|
|
141
152
|
window.removeEventListener('paste', handlePaste);
|
|
142
153
|
};
|
|
143
|
-
}, []);
|
|
154
|
+
}, [handleDrop, handlePaste]);
|
|
144
155
|
|
|
145
156
|
return (
|
|
146
157
|
isDragging && (
|
|
@@ -164,3 +175,4 @@ const DragUpload = memo(() => {
|
|
|
164
175
|
});
|
|
165
176
|
|
|
166
177
|
export default DragUpload;
|
|
178
|
+
|