diff --git a/docs/changelog/index.json b/docs/changelog/index.json index ab2662c7fa6a..34affde1590c 100644 --- a/docs/changelog/index.json +++ b/docs/changelog/index.json @@ -2,6 +2,12 @@ "$schema": "https://github.com/lobehub/lobe-chat/blob/main/docs/changelog/schema.json", "cloud": [], "community": [ + { + "image": "https://github.com/user-attachments/assets/3d80e0f5-d32a-4412-85b2-e709731460a0", + "id": "2025-01-03-user-profile", + "date": "2025-01-03", + "versionRange": ["1.43.0", "1.43.1"] + }, { "image": "https://github.com/user-attachments/assets/2048b4c2-4a56-4029-acf9-71e35ff08652", "id": "2024-11-27-forkable-chat", diff --git a/src/app/manifest.ts b/src/app/manifest.ts index 0fc4643c84fa..a87d0f6cc4df 100644 --- a/src/app/manifest.ts +++ b/src/app/manifest.ts @@ -3,13 +3,10 @@ import type { MetadataRoute } from 'next'; import { BRANDING_LOGO_URL, BRANDING_NAME } from '@/const/branding'; import { manifestModule } from '@/server/manifest'; -import { translation } from '@/server/translation'; - -const manifest = async (): Promise => { - const { t } = await translation('metadata'); +const manifest = (): MetadataRoute.Manifest | any => { return manifestModule.generate({ - description: t('chat.description', { appName: BRANDING_NAME }), + description: `${BRANDING_NAME} brings you the best UI experience for ChatGPT, Claude, Gemini, and OLLaMA.`, icons: [ { purpose: 'any', diff --git a/src/database/server/models/__tests__/message.test.ts b/src/database/server/models/__tests__/message.test.ts index e60a9cf1c3b5..ee18eaaaefa0 100644 --- a/src/database/server/models/__tests__/message.test.ts +++ b/src/database/server/models/__tests__/message.test.ts @@ -1278,14 +1278,14 @@ describe('MessageModel', () => { (item) => item.date === today.subtract(2, 'day').format('YYYY-MM-DD'), ); expect(twoDaysAgo?.count).toBe(2); - expect(twoDaysAgo?.level).toBe(0); + expect(twoDaysAgo?.level).toBe(1); // 检查一天前的数据 const oneDayAgo = result.find( (item) => item.date === today.subtract(1, 'day').format('YYYY-MM-DD'), ); expect(oneDayAgo?.count).toBe(1); - expect(oneDayAgo?.level).toBe(0); + expect(oneDayAgo?.level).toBe(1); // 检查今天的数据 const todayData = result.find((item) => item.date === today.format('YYYY-MM-DD')); @@ -1356,25 +1356,25 @@ describe('MessageModel', () => { (item) => item.date === today.subtract(4, 'day').format('YYYY-MM-DD'), ); expect(fourDaysAgo?.count).toBe(1); - expect(fourDaysAgo?.level).toBe(0); + expect(fourDaysAgo?.level).toBe(1); const threeDaysAgo = result.find( (item) => item.date === today.subtract(3, 'day').format('YYYY-MM-DD'), ); expect(threeDaysAgo?.count).toBe(6); - expect(threeDaysAgo?.level).toBe(1); + expect(threeDaysAgo?.level).toBe(2); const twoDaysAgo = result.find( (item) => item.date === today.subtract(2, 'day').format('YYYY-MM-DD'), ); expect(twoDaysAgo?.count).toBe(11); - expect(twoDaysAgo?.level).toBe(2); + expect(twoDaysAgo?.level).toBe(3); const oneDayAgo = result.find( (item) => item.date === today.subtract(1, 'day').format('YYYY-MM-DD'), ); expect(oneDayAgo?.count).toBe(16); - expect(oneDayAgo?.level).toBe(3); + expect(oneDayAgo?.level).toBe(4); const todayData = result.find((item) => item.date === today.format('YYYY-MM-DD')); expect(todayData?.count).toBe(21); diff --git a/src/database/server/models/message.ts b/src/database/server/models/message.ts index 8e554c6864ad..a5114ea47a6b 100644 --- a/src/database/server/models/message.ts +++ b/src/database/server/models/message.ts @@ -378,7 +378,7 @@ export class MessageModel { ); const count = matchingResult ? matchingResult.count : 0; - const levelCount = count > 0 ? Math.floor(count / 5) : 0; + const levelCount = count > 0 ? Math.ceil(count / 5) : 0; const level = levelCount > 4 ? 4 : levelCount; heatmapData.push({