From 46bdceaa46e1f589c4353ce94b1dfba967e91997 Mon Sep 17 00:00:00 2001 From: Arvin Xu Date: Mon, 19 Aug 2024 01:56:39 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20refactor?= =?UTF-8?q?=20the=20`SITE=5FURL`=20to=20`APP=5FURL`=20(#3504)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/metadata.ts | 5 ++--- src/config/app.ts | 4 ++-- src/server/ld.ts | 18 ++++++++---------- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/app/metadata.ts b/src/app/metadata.ts index 4f2a3ef122de..429a03e7cff1 100644 --- a/src/app/metadata.ts +++ b/src/app/metadata.ts @@ -1,12 +1,11 @@ import { Metadata } from 'next'; -import { appEnv, getAppConfig } from '@/config/app'; +import { appEnv } from '@/config/app'; import { OFFICIAL_URL, OG_URL } from '@/const/url'; import { translation } from '@/server/translation'; const title = 'LobeChat'; -const { SITE_URL = OFFICIAL_URL } = getAppConfig(); const BASE_PATH = appEnv.NEXT_PUBLIC_BASE_PATH; // if there is a base path, then we don't need the manifest @@ -27,7 +26,7 @@ export const generateMetadata = async (): Promise => { shortcut: '/favicon-32x32.ico?v=1', }, manifest: noManifest ? undefined : '/manifest.json', - metadataBase: new URL(SITE_URL), + metadataBase: new URL(OFFICIAL_URL), openGraph: { description: t('chat.description'), images: [ diff --git a/src/config/app.ts b/src/config/app.ts index 4b7917924d22..344e3455d103 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -30,7 +30,7 @@ export const getAppConfig = () => { PLUGINS_INDEX_URL: z.string().url(), PLUGIN_SETTINGS: z.string().optional(), - SITE_URL: z.string().optional(), + APP_URL: z.string().optional(), }, runtimeEnv: { NEXT_PUBLIC_BASE_PATH: process.env.NEXT_PUBLIC_BASE_PATH || '', @@ -52,7 +52,7 @@ export const getAppConfig = () => { : 'https://chat-plugins.lobehub.com', PLUGIN_SETTINGS: process.env.PLUGIN_SETTINGS, - SITE_URL: process.env.SITE_URL, + APP_URL: process.env.APP_URL, }, }); }; diff --git a/src/server/ld.ts b/src/server/ld.ts index 719c4663bae3..51eabaa98e87 100644 --- a/src/server/ld.ts +++ b/src/server/ld.ts @@ -1,11 +1,9 @@ import urlJoin from 'url-join'; -import { getAppConfig } from '@/config/app'; import { EMAIL_BUSINESS, EMAIL_SUPPORT, OFFICIAL_SITE, OFFICIAL_URL, X } from '@/const/url'; import pkg from '../../package.json'; -const { SITE_URL = OFFICIAL_URL } = getAppConfig(); const LAST_MODIFIED = new Date().toISOString(); export const AUTHOR_LIST = { arvinxx: { @@ -70,7 +68,7 @@ class Ld { genOrganization() { return { - '@id': this.getId(SITE_URL, '#organization'), + '@id': this.getId(OFFICIAL_URL, '#organization'), '@type': 'Organization', 'alternateName': 'LobeChat', 'contactPoint': { @@ -102,7 +100,7 @@ class Ld { getAuthors(ids: string[] = []) { const defaultAuthor = { - '@id': this.getId(SITE_URL, '#organization'), + '@id': this.getId(OFFICIAL_URL, '#organization'), '@type': 'Organization', }; if (!ids || ids.length === 0) return defaultAuthor; @@ -142,7 +140,7 @@ class Ld { '@id': fixedUrl, '@type': 'WebPage', 'about': { - '@id': this.getId(SITE_URL, '#organization'), + '@id': this.getId(OFFICIAL_URL, '#organization'), }, 'breadcrumbs': { '@id': this.getId(fixedUrl, '#breadcrumb'), @@ -155,7 +153,7 @@ class Ld { }, 'inLanguage': 'en-US', 'isPartOf': { - '@id': this.getId(SITE_URL, '#website'), + '@id': this.getId(OFFICIAL_URL, '#website'), }, 'name': this.fixTitle(title), 'primaryImageOfPage': { @@ -188,15 +186,15 @@ class Ld { genWebSite() { const baseInfo: any = { - '@id': this.getId(SITE_URL, '#website'), + '@id': this.getId(OFFICIAL_URL, '#website'), '@type': 'WebSite', 'description': pkg.description, 'inLanguage': 'en-US', 'name': 'LobeChat', 'publisher': { - '@id': this.getId(SITE_URL, '#organization'), + '@id': this.getId(OFFICIAL_URL, '#organization'), }, - 'url': SITE_URL, + 'url': OFFICIAL_URL, }; return baseInfo; @@ -211,7 +209,7 @@ class Ld { } private fixUrl(url: string) { - return urlJoin(SITE_URL, url); + return urlJoin(OFFICIAL_URL, url); } } From c68cffdfd6dc593851dd57c82dd30c5aad377119 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 18 Aug 2024 18:03:03 +0000 Subject: [PATCH 2/6] :bookmark: chore(release): v1.11.6 [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### [Version 1.11.6](https://github.com/lobehub/lobe-chat/compare/v1.11.5...v1.11.6) Released on **2024-08-18** #### ♻ Code Refactoring - **misc**: Refactor the `SITE_URL` to `APP_URL`.
Improvements and Fixes #### Code refactoring * **misc**: Refactor the `SITE_URL` to `APP_URL`, closes [#3504](https://github.com/lobehub/lobe-chat/issues/3504) ([46bdcea](https://github.com/lobehub/lobe-chat/commit/46bdcea))
[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
--- CHANGELOG.md | 25 +++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68dc5b16eb01..56af2158bde9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,31 @@ # Changelog +### [Version 1.11.6](https://github.com/lobehub/lobe-chat/compare/v1.11.5...v1.11.6) + +Released on **2024-08-18** + +#### ♻ Code Refactoring + +- **misc**: Refactor the `SITE_URL` to `APP_URL`. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the `SITE_URL` to `APP_URL`, closes [#3504](https://github.com/lobehub/lobe-chat/issues/3504) ([46bdcea](https://github.com/lobehub/lobe-chat/commit/46bdcea)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ ### [Version 1.11.5](https://github.com/lobehub/lobe-chat/compare/v1.11.4...v1.11.5) Released on **2024-08-18** diff --git a/package.json b/package.json index 081f94029189..a7865962f036 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lobehub/chat", - "version": "1.11.5", + "version": "1.11.6", "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.", "keywords": [ "framework", From c719c7a702cc5c1b5ec62c7d035960876a47ed67 Mon Sep 17 00:00:00 2001 From: Arvin Xu Date: Mon, 19 Aug 2024 02:11:37 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=90=9B=20fix:=20fix=20topic=20scroll?= =?UTF-8?q?=20issue=20(#3505)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🔧 chore: only include db file with server test * 🐛 fix: fix topic scroll --- .../@topic/features/TopicListContent/index.tsx | 12 ++++++------ vitest.server.config.ts | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/index.tsx b/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/index.tsx index b5baf275559a..82ea0fa14195 100644 --- a/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/index.tsx +++ b/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/index.tsx @@ -15,7 +15,7 @@ import { useSessionStore } from '@/store/session'; import { useUserStore } from '@/store/user'; import { ChatTopic } from '@/types/topic'; -import { Placeholder, SkeletonList } from '../SkeletonList'; +import { SkeletonList } from '../SkeletonList'; import TopicItem from './TopicItem'; const TopicListContent = memo(() => { @@ -85,7 +85,7 @@ const TopicListContent = memo(() => { )} item.id} data={topics} fixedItemHeight={44} @@ -93,10 +93,10 @@ const TopicListContent = memo(() => { itemContent={itemContent} overscan={44 * 10} ref={virtuosoRef} - scrollSeekConfiguration={{ - enter: (velocity) => Math.abs(velocity) > 350, - exit: (velocity) => Math.abs(velocity) < 10, - }} + // scrollSeekConfiguration={{ + // enter: (velocity) => Math.abs(velocity) > 350, + // exit: (velocity) => Math.abs(velocity) < 10, + // }} /> ); diff --git a/vitest.server.config.ts b/vitest.server.config.ts index 4843987e71e0..84906f5986fc 100644 --- a/vitest.server.config.ts +++ b/vitest.server.config.ts @@ -9,6 +9,7 @@ export default defineConfig({ coverage: { all: false, exclude: ['src/database/server/core/dbForTest.ts'], + include: ['src/database/server/**/*.ts'], provider: 'v8', reporter: ['text', 'json', 'lcov', 'text-summary'], reportsDirectory: './coverage/server', From cf520e5d9fd733a5c4707d1e2fa84846ad24a946 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 18 Aug 2024 18:18:21 +0000 Subject: [PATCH 4/6] :bookmark: chore(release): v1.11.7 [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### [Version 1.11.7](https://github.com/lobehub/lobe-chat/compare/v1.11.6...v1.11.7) Released on **2024-08-18** #### 🐛 Bug Fixes - **misc**: Fix topic scroll issue.
Improvements and Fixes #### What's fixed * **misc**: Fix topic scroll issue, closes [#3505](https://github.com/lobehub/lobe-chat/issues/3505) ([c719c7a](https://github.com/lobehub/lobe-chat/commit/c719c7a))
[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
--- CHANGELOG.md | 25 +++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56af2158bde9..f8460cf4a5a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,31 @@ # Changelog +### [Version 1.11.7](https://github.com/lobehub/lobe-chat/compare/v1.11.6...v1.11.7) + +Released on **2024-08-18** + +#### 🐛 Bug Fixes + +- **misc**: Fix topic scroll issue. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix topic scroll issue, closes [#3505](https://github.com/lobehub/lobe-chat/issues/3505) ([c719c7a](https://github.com/lobehub/lobe-chat/commit/c719c7a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ ### [Version 1.11.6](https://github.com/lobehub/lobe-chat/compare/v1.11.5...v1.11.6) Released on **2024-08-18** diff --git a/package.json b/package.json index a7865962f036..2ec9856f0d5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lobehub/chat", - "version": "1.11.6", + "version": "1.11.7", "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.", "keywords": [ "framework", From 65080c5c3ba70b692ec538fdf41333a950f17b92 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 02:21:02 +0800 Subject: [PATCH 5/6] Update pnpm to v9.7.1 (#3496) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2ec9856f0d5f..f8cff0cb4342 100644 --- a/package.json +++ b/package.json @@ -283,7 +283,7 @@ "vitest": "~1.2.2", "vitest-canvas-mock": "^0.3.3" }, - "packageManager": "pnpm@9.7.0", + "packageManager": "pnpm@9.7.1", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org" From 9f55c0a86b0046813c4f9d33710f210fa1a008c8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 02:21:28 +0800 Subject: [PATCH 6/6] Update dependency unstructured-client to ^0.15.0 (#3500) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f8cff0cb4342..9283ebcf34ba 100644 --- a/package.json +++ b/package.json @@ -204,7 +204,7 @@ "systemjs": "^6.15.1", "ts-md5": "^1.3.1", "ua-parser-js": "^1.0.38", - "unstructured-client": "^0.11.3", + "unstructured-client": "^0.15.0", "url-join": "^5.0.0", "use-merge-value": "^1.2.0", "utility-types": "^3.11.0",