@lobehub/chat 1.43.1 → 1.43.2
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/changelog/v1.json +9 -0
- package/docs/changelog/index.json +6 -0
- package/package.json +1 -1
- package/src/app/(main)/profile/@category/default.tsx +9 -1
- package/src/app/(main)/profile/_layout/Desktop/SideBar.tsx +3 -1
- package/src/app/manifest.ts +2 -5
- package/src/database/server/models/__tests__/message.test.ts +6 -6
- package/src/database/server/models/message.ts +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,31 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.43.2](https://github.com/lobehub/lobe-chat/compare/v1.43.1...v1.43.2)
|
6
|
+
|
7
|
+
<sup>Released on **2025-01-04**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Fix heatmap and manifest.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's fixed
|
19
|
+
|
20
|
+
- **misc**: Fix heatmap and manifest, closes [#5289](https://github.com/lobehub/lobe-chat/issues/5289) ([3973249](https://github.com/lobehub/lobe-chat/commit/3973249))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
5
30
|
### [Version 1.43.1](https://github.com/lobehub/lobe-chat/compare/v1.43.0...v1.43.1)
|
6
31
|
|
7
32
|
<sup>Released on **2025-01-03**</sup>
|
package/changelog/v1.json
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
"$schema": "https://github.com/lobehub/lobe-chat/blob/main/docs/changelog/schema.json",
|
3
3
|
"cloud": [],
|
4
4
|
"community": [
|
5
|
+
{
|
6
|
+
"image": "https://github.com/user-attachments/assets/3d80e0f5-d32a-4412-85b2-e709731460a0",
|
7
|
+
"id": "2025-01-03-user-profile",
|
8
|
+
"date": "2025-01-03",
|
9
|
+
"versionRange": ["1.43.0", "1.43.1"]
|
10
|
+
},
|
5
11
|
{
|
6
12
|
"image": "https://github.com/user-attachments/assets/2048b4c2-4a56-4029-acf9-71e35ff08652",
|
7
13
|
"id": "2024-11-27-forkable-chat",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.43.
|
3
|
+
"version": "1.43.2",
|
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",
|
@@ -1,7 +1,15 @@
|
|
1
|
+
import { Suspense } from 'react';
|
2
|
+
|
3
|
+
import SkeletonLoading from '@/components/Loading/SkeletonLoading';
|
4
|
+
|
1
5
|
import CategoryContent from './features/CategoryContent';
|
2
6
|
|
3
7
|
const Category = () => {
|
4
|
-
return
|
8
|
+
return (
|
9
|
+
<Suspense fallback={<SkeletonLoading paragraph={{ rows: 7 }} title={false} />}>
|
10
|
+
<CategoryContent />
|
11
|
+
</Suspense>
|
12
|
+
);
|
5
13
|
};
|
6
14
|
|
7
15
|
Category.displayName = 'SettingCategory';
|
@@ -1,10 +1,12 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
3
|
import { createStyles } from 'antd-style';
|
4
|
+
import { Suspense } from 'react';
|
4
5
|
import { useTranslation } from 'react-i18next';
|
5
6
|
import { Flexbox, FlexboxProps } from 'react-layout-kit';
|
6
7
|
|
7
8
|
import BrandWatermark from '@/components/BrandWatermark';
|
9
|
+
import CircleLoading from '@/components/Loading/CircleLoading';
|
8
10
|
import PanelTitle from '@/components/PanelTitle';
|
9
11
|
|
10
12
|
const useStyles = createStyles(({ token, css }) => ({
|
@@ -33,7 +35,7 @@ const SidebarLayout = ({ children, className, title, desc, ...rest }: SidebarLay
|
|
33
35
|
{...rest}
|
34
36
|
>
|
35
37
|
<PanelTitle desc={desc || t('header.desc')} title={title || t('header.title')} />
|
36
|
-
{children}
|
38
|
+
<Suspense fallback={<CircleLoading />}>{children}</Suspense>
|
37
39
|
<BrandWatermark paddingInline={12} />
|
38
40
|
</Flexbox>
|
39
41
|
);
|
package/src/app/manifest.ts
CHANGED
@@ -3,13 +3,10 @@ import type { MetadataRoute } from 'next';
|
|
3
3
|
|
4
4
|
import { BRANDING_LOGO_URL, BRANDING_NAME } from '@/const/branding';
|
5
5
|
import { manifestModule } from '@/server/manifest';
|
6
|
-
import { translation } from '@/server/translation';
|
7
|
-
|
8
|
-
const manifest = async (): Promise<MetadataRoute.Manifest | any> => {
|
9
|
-
const { t } = await translation('metadata');
|
10
6
|
|
7
|
+
const manifest = (): MetadataRoute.Manifest | any => {
|
11
8
|
return manifestModule.generate({
|
12
|
-
description:
|
9
|
+
description: `${BRANDING_NAME} brings you the best UI experience for ChatGPT, Claude, Gemini, and OLLaMA.`,
|
13
10
|
icons: [
|
14
11
|
{
|
15
12
|
purpose: 'any',
|
@@ -1278,14 +1278,14 @@ describe('MessageModel', () => {
|
|
1278
1278
|
(item) => item.date === today.subtract(2, 'day').format('YYYY-MM-DD'),
|
1279
1279
|
);
|
1280
1280
|
expect(twoDaysAgo?.count).toBe(2);
|
1281
|
-
expect(twoDaysAgo?.level).toBe(
|
1281
|
+
expect(twoDaysAgo?.level).toBe(1);
|
1282
1282
|
|
1283
1283
|
// 检查一天前的数据
|
1284
1284
|
const oneDayAgo = result.find(
|
1285
1285
|
(item) => item.date === today.subtract(1, 'day').format('YYYY-MM-DD'),
|
1286
1286
|
);
|
1287
1287
|
expect(oneDayAgo?.count).toBe(1);
|
1288
|
-
expect(oneDayAgo?.level).toBe(
|
1288
|
+
expect(oneDayAgo?.level).toBe(1);
|
1289
1289
|
|
1290
1290
|
// 检查今天的数据
|
1291
1291
|
const todayData = result.find((item) => item.date === today.format('YYYY-MM-DD'));
|
@@ -1356,25 +1356,25 @@ describe('MessageModel', () => {
|
|
1356
1356
|
(item) => item.date === today.subtract(4, 'day').format('YYYY-MM-DD'),
|
1357
1357
|
);
|
1358
1358
|
expect(fourDaysAgo?.count).toBe(1);
|
1359
|
-
expect(fourDaysAgo?.level).toBe(
|
1359
|
+
expect(fourDaysAgo?.level).toBe(1);
|
1360
1360
|
|
1361
1361
|
const threeDaysAgo = result.find(
|
1362
1362
|
(item) => item.date === today.subtract(3, 'day').format('YYYY-MM-DD'),
|
1363
1363
|
);
|
1364
1364
|
expect(threeDaysAgo?.count).toBe(6);
|
1365
|
-
expect(threeDaysAgo?.level).toBe(
|
1365
|
+
expect(threeDaysAgo?.level).toBe(2);
|
1366
1366
|
|
1367
1367
|
const twoDaysAgo = result.find(
|
1368
1368
|
(item) => item.date === today.subtract(2, 'day').format('YYYY-MM-DD'),
|
1369
1369
|
);
|
1370
1370
|
expect(twoDaysAgo?.count).toBe(11);
|
1371
|
-
expect(twoDaysAgo?.level).toBe(
|
1371
|
+
expect(twoDaysAgo?.level).toBe(3);
|
1372
1372
|
|
1373
1373
|
const oneDayAgo = result.find(
|
1374
1374
|
(item) => item.date === today.subtract(1, 'day').format('YYYY-MM-DD'),
|
1375
1375
|
);
|
1376
1376
|
expect(oneDayAgo?.count).toBe(16);
|
1377
|
-
expect(oneDayAgo?.level).toBe(
|
1377
|
+
expect(oneDayAgo?.level).toBe(4);
|
1378
1378
|
|
1379
1379
|
const todayData = result.find((item) => item.date === today.format('YYYY-MM-DD'));
|
1380
1380
|
expect(todayData?.count).toBe(21);
|
@@ -378,7 +378,7 @@ export class MessageModel {
|
|
378
378
|
);
|
379
379
|
|
380
380
|
const count = matchingResult ? matchingResult.count : 0;
|
381
|
-
const levelCount = count > 0 ? Math.
|
381
|
+
const levelCount = count > 0 ? Math.ceil(count / 5) : 0;
|
382
382
|
const level = levelCount > 4 ? 4 : levelCount;
|
383
383
|
|
384
384
|
heatmapData.push({
|