@lobehub/chat 1.70.5 → 1.70.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 +50 -0
- package/README.md +3 -3
- package/README.zh-CN.md +8 -8
- package/changelog/v1.json +18 -0
- package/package.json +1 -1
- package/packages/web-crawler/src/__tests__/crawler.test.ts +33 -5
- package/packages/web-crawler/src/crawler.ts +1 -1
- package/src/app/[variants]/(main)/profile/stats/Client.tsx +2 -2
- package/src/app/[variants]/(main)/profile/stats/features/AssistantsRank.tsx +2 -1
- package/src/app/[variants]/(main)/profile/stats/features/TopicsRank.tsx +2 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,56 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.70.7](https://github.com/lobehub/lobe-chat/compare/v1.70.6...v1.70.7)
|
6
|
+
|
7
|
+
<sup>Released on **2025-03-12**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Fix crawl result for short content.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's fixed
|
19
|
+
|
20
|
+
- **misc**: Fix crawl result for short content, closes [#6903](https://github.com/lobehub/lobe-chat/issues/6903) [#6904](https://github.com/lobehub/lobe-chat/issues/6904) ([d8fda65](https://github.com/lobehub/lobe-chat/commit/d8fda65))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
30
|
+
### [Version 1.70.6](https://github.com/lobehub/lobe-chat/compare/v1.70.5...v1.70.6)
|
31
|
+
|
32
|
+
<sup>Released on **2025-03-11**</sup>
|
33
|
+
|
34
|
+
#### 🐛 Bug Fixes
|
35
|
+
|
36
|
+
- **misc**: Link jump in mobile terminal data statistics.
|
37
|
+
|
38
|
+
<br/>
|
39
|
+
|
40
|
+
<details>
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
42
|
+
|
43
|
+
#### What's fixed
|
44
|
+
|
45
|
+
- **misc**: Link jump in mobile terminal data statistics, closes [#6893](https://github.com/lobehub/lobe-chat/issues/6893) ([505d24d](https://github.com/lobehub/lobe-chat/commit/505d24d))
|
46
|
+
|
47
|
+
</details>
|
48
|
+
|
49
|
+
<div align="right">
|
50
|
+
|
51
|
+
[](#readme-top)
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
5
55
|
### [Version 1.70.5](https://github.com/lobehub/lobe-chat/compare/v1.70.4...v1.70.5)
|
6
56
|
|
7
57
|
<sup>Released on **2025-03-11**</sup>
|
package/README.md
CHANGED
@@ -364,12 +364,12 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
364
364
|
|
365
365
|
| Recent Submits | Description |
|
366
366
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
367
|
+
| [审稿回复专家](https://lobechat.com/discover/assistant/academic-paper-overview)<br/><sup>By **[arvinxx](https://github.com/arvinxx)** on **2025-03-11**</sup> | 擅长高质量文献检索与分析的学术研究助手<br/>`学术研究` `文献检索` `数据分析` `信息提取` `咨询` |
|
367
368
|
| [Cron Expression Assistant](https://lobechat.com/discover/assistant/crontab-generate)<br/><sup>By **[edgesider](https://github.com/edgesider)** on **2025-02-17**</sup> | Crontab Expression Generator<br/>`crontab` `time-expression` `trigger-time` `generator` `technical-assistance` |
|
368
369
|
| [Xiao Zhi French Translation Assistant](https://lobechat.com/discover/assistant/xiao-zhi-french-translation-asst-v-1)<br/><sup>By **[WeR-Best](https://github.com/WeR-Best)** on **2025-02-10**</sup> | A friendly, professional, and empathetic AI assistant for French translation<br/>`ai-assistant` `french-translation` `cross-cultural-communication` `creativity` |
|
369
|
-
| [
|
370
|
-
| [Astrology Researcher](https://lobechat.com/discover/assistant/fate-researcher)<br/><sup>By **[Jack980506](https://github.com/Jack980506)** on **2025-02-06**</sup> | Expert in BaZi astrology<br/>`astrology` `ba-zi` `traditional-culture` |
|
370
|
+
| [Investment Assistant](https://lobechat.com/discover/assistant/graham-investmentassi)<br/><sup>By **[farsightlin](https://github.com/farsightlin)** on **2025-02-06**</sup> | Helps users calculate the data needed for valuation<br/>`investment` `valuation` `financial-analysis` `calculator` |
|
371
371
|
|
372
|
-
> 📊 Total agents: [<kbd>**
|
372
|
+
> 📊 Total agents: [<kbd>**488**</kbd> ](https://lobechat.com/discover/assistants)
|
373
373
|
|
374
374
|
<!-- AGENT LIST -->
|
375
375
|
|
package/README.zh-CN.md
CHANGED
@@ -351,14 +351,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
351
351
|
|
352
352
|
<!-- AGENT LIST -->
|
353
353
|
|
354
|
-
| 最近新增 | 描述
|
355
|
-
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
356
|
-
| [
|
357
|
-
| [
|
358
|
-
| [
|
359
|
-
| [
|
360
|
-
|
361
|
-
> 📊 Total agents: [<kbd>**
|
354
|
+
| 最近新增 | 描述 |
|
355
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
356
|
+
| [审稿回复专家](https://lobechat.com/discover/assistant/academic-paper-overview)<br/><sup>By **[arvinxx](https://github.com/arvinxx)** on **2025-03-11**</sup> | 擅长高质量文献检索与分析的学术研究助手<br/>`学术研究` `文献检索` `数据分析` `信息提取` `咨询` |
|
357
|
+
| [Cron 表达式助手](https://lobechat.com/discover/assistant/crontab-generate)<br/><sup>By **[edgesider](https://github.com/edgesider)** on **2025-02-17**</sup> | Crontab 表达式生成<br/>`crontab` `时间表达` `触发时间` `生成器` `技术辅助` |
|
358
|
+
| [小智法语翻译助手](https://lobechat.com/discover/assistant/xiao-zhi-french-translation-asst-v-1)<br/><sup>By **[WeR-Best](https://github.com/WeR-Best)** on **2025-02-10**</sup> | 友好、专业、富有同理心的法语翻译 AI 助手<br/>`ai助手` `法语翻译` `跨文化交流` `创造力` |
|
359
|
+
| [投资小助手](https://lobechat.com/discover/assistant/graham-investmentassi)<br/><sup>By **[farsightlin](https://github.com/farsightlin)** on **2025-02-06**</sup> | 帮助用户计算估值所需的一些数据<br/>`投资` `估值` `财务分析` `计算器` |
|
360
|
+
|
361
|
+
> 📊 Total agents: [<kbd>**488**</kbd> ](https://lobechat.com/discover/assistants)
|
362
362
|
|
363
363
|
<!-- AGENT LIST -->
|
364
364
|
|
package/changelog/v1.json
CHANGED
@@ -1,4 +1,22 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"children": {
|
4
|
+
"fixes": [
|
5
|
+
"Fix crawl result for short content."
|
6
|
+
]
|
7
|
+
},
|
8
|
+
"date": "2025-03-12",
|
9
|
+
"version": "1.70.7"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"children": {
|
13
|
+
"fixes": [
|
14
|
+
"Link jump in mobile terminal data statistics."
|
15
|
+
]
|
16
|
+
},
|
17
|
+
"date": "2025-03-11",
|
18
|
+
"version": "1.70.6"
|
19
|
+
},
|
2
20
|
{
|
3
21
|
"children": {
|
4
22
|
"fixes": [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.70.
|
3
|
+
"version": "1.70.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",
|
@@ -23,7 +23,7 @@ describe('Crawler', () => {
|
|
23
23
|
|
24
24
|
it('should crawl successfully with default impls', async () => {
|
25
25
|
const mockResult = {
|
26
|
-
content: 'test content',
|
26
|
+
content: 'test content'.padEnd(101, ' '), // Ensure content length > 100
|
27
27
|
contentType: 'text' as const,
|
28
28
|
url: 'https://example.com',
|
29
29
|
};
|
@@ -45,7 +45,7 @@ describe('Crawler', () => {
|
|
45
45
|
|
46
46
|
it('should use user provided impls', async () => {
|
47
47
|
const mockResult = {
|
48
|
-
content: 'test content',
|
48
|
+
content: 'test content'.padEnd(101, ' '), // Ensure content length > 100
|
49
49
|
contentType: 'text' as const,
|
50
50
|
url: 'https://example.com',
|
51
51
|
};
|
@@ -93,7 +93,7 @@ describe('Crawler', () => {
|
|
93
93
|
|
94
94
|
it('should handle transformed urls', async () => {
|
95
95
|
const mockResult = {
|
96
|
-
content: 'test content',
|
96
|
+
content: 'test content'.padEnd(101, ' '), // Ensure content length > 100
|
97
97
|
contentType: 'text' as const,
|
98
98
|
url: 'https://transformed.example.com',
|
99
99
|
};
|
@@ -121,7 +121,7 @@ describe('Crawler', () => {
|
|
121
121
|
|
122
122
|
it('should merge filter options correctly', async () => {
|
123
123
|
const mockResult = {
|
124
|
-
content: 'test content',
|
124
|
+
content: 'test content'.padEnd(101, ' '), // Ensure content length > 100
|
125
125
|
contentType: 'text' as const,
|
126
126
|
url: 'https://example.com',
|
127
127
|
};
|
@@ -150,7 +150,7 @@ describe('Crawler', () => {
|
|
150
150
|
|
151
151
|
it('should use rule impls when provided', async () => {
|
152
152
|
const mockResult = {
|
153
|
-
content: 'test content',
|
153
|
+
content: 'test content'.padEnd(101, ' '), // Ensure content length > 100
|
154
154
|
contentType: 'text' as const,
|
155
155
|
url: 'https://example.com',
|
156
156
|
};
|
@@ -176,4 +176,32 @@ describe('Crawler', () => {
|
|
176
176
|
transformedUrl: undefined,
|
177
177
|
});
|
178
178
|
});
|
179
|
+
|
180
|
+
it('should skip results with content length <= 100', async () => {
|
181
|
+
const mockResult = {
|
182
|
+
content: 'short content', // Content length <= 100
|
183
|
+
contentType: 'text' as const,
|
184
|
+
url: 'https://example.com',
|
185
|
+
};
|
186
|
+
|
187
|
+
const { crawlImpls } = await import('../crawImpl');
|
188
|
+
vi.mocked(crawlImpls.naive).mockResolvedValue(mockResult);
|
189
|
+
vi.mocked(crawlImpls.jina).mockResolvedValue(mockResult);
|
190
|
+
vi.mocked(crawlImpls.browserless).mockResolvedValue(mockResult);
|
191
|
+
|
192
|
+
const result = await crawler.crawl({
|
193
|
+
url: 'https://example.com',
|
194
|
+
});
|
195
|
+
|
196
|
+
expect(result).toEqual({
|
197
|
+
crawler: undefined,
|
198
|
+
data: {
|
199
|
+
content: 'Fail to crawl the page. Error type: UnknownError, error message: undefined',
|
200
|
+
errorMessage: undefined,
|
201
|
+
errorType: 'UnknownError',
|
202
|
+
},
|
203
|
+
originalUrl: 'https://example.com',
|
204
|
+
transformedUrl: undefined,
|
205
|
+
});
|
206
|
+
});
|
179
207
|
});
|
@@ -42,8 +42,8 @@ const Client = memo<{ mobile?: boolean }>(({ mobile }) => {
|
|
42
42
|
<AiHeatmaps mobile={mobile} />
|
43
43
|
<Grid gap={mobile ? 0 : 48} rows={3}>
|
44
44
|
<ModelsRank />
|
45
|
-
<AssistantsRank />
|
46
|
-
<TopicsRank />
|
45
|
+
<AssistantsRank mobile={mobile} />
|
46
|
+
<TopicsRank mobile={mobile} />
|
47
47
|
</Grid>
|
48
48
|
</Flexbox>
|
49
49
|
);
|
@@ -15,7 +15,7 @@ import { useClientDataSWR } from '@/libs/swr';
|
|
15
15
|
import { sessionService } from '@/services/session';
|
16
16
|
import { SessionRankItem } from '@/types/session';
|
17
17
|
|
18
|
-
export const AssistantsRank = memo(() => {
|
18
|
+
export const AssistantsRank = memo<{ mobile?: boolean }>(({ mobile }) => {
|
19
19
|
const [open, setOpen] = useState(false);
|
20
20
|
const { t } = useTranslation(['auth', 'chat']);
|
21
21
|
const router = useRouter();
|
@@ -29,6 +29,7 @@ export const AssistantsRank = memo(() => {
|
|
29
29
|
const link = qs.stringifyUrl({
|
30
30
|
query: {
|
31
31
|
session: item.id,
|
32
|
+
...(mobile ? { showMobileWorkspace: true } : {}),
|
32
33
|
},
|
33
34
|
url: '/chat',
|
34
35
|
});
|
@@ -15,7 +15,7 @@ import { useClientDataSWR } from '@/libs/swr';
|
|
15
15
|
import { topicService } from '@/services/topic';
|
16
16
|
import { TopicRankItem } from '@/types/topic';
|
17
17
|
|
18
|
-
export const TopicsRank = memo(() => {
|
18
|
+
export const TopicsRank = memo<{ mobile?: boolean }>(({ mobile }) => {
|
19
19
|
const [open, setOpen] = useState(false);
|
20
20
|
const { t } = useTranslation('auth');
|
21
21
|
const theme = useTheme();
|
@@ -31,6 +31,7 @@ export const TopicsRank = memo(() => {
|
|
31
31
|
query: {
|
32
32
|
session: item.sessionId || INBOX_SESSION_ID,
|
33
33
|
topic: item.id,
|
34
|
+
...(mobile ? { showMobileWorkspace: true } : {}),
|
34
35
|
},
|
35
36
|
url: '/chat',
|
36
37
|
});
|