diff --git a/CHANGELOG.md b/CHANGELOG.md index fb9a2c1926ebb..868482d527602 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,115 @@ # Changelog +### [Version 1.52.15](https://github.com/lobehub/lobe-chat/compare/v1.52.14...v1.52.15) + +Released on **2025-02-10** + +#### 🐛 Bug Fixes + +- **misc**: Fix lmstudio baseURL. + +#### 💄 Styles + +- **misc**: Optimized MaxToken Slider. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix lmstudio baseURL, closes [#5988](https://github.com/lobehub/lobe-chat/issues/5988) ([1d19aa6](https://github.com/lobehub/lobe-chat/commit/1d19aa6)) + +#### Styles + +- **misc**: Optimized MaxToken Slider, closes [#5952](https://github.com/lobehub/lobe-chat/issues/5952) ([3cdcb95](https://github.com/lobehub/lobe-chat/commit/3cdcb95)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.52.14](https://github.com/lobehub/lobe-chat/compare/v1.52.13...v1.52.14) + +Released on **2025-02-10** + +#### 💄 Styles + +- **misc**: Refactor agent settings modal. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Refactor agent settings modal, closes [#5987](https://github.com/lobehub/lobe-chat/issues/5987) ([6482f8a](https://github.com/lobehub/lobe-chat/commit/6482f8a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.52.13](https://github.com/lobehub/lobe-chat/compare/v1.52.12...v1.52.13) + +Released on **2025-02-10** + +#### 🐛 Bug Fixes + +- **misc**: Fix Aliyun deepseek-r1 reasoning parsing with oneapi, Support Aliyun deepseek-r1 reasoning. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix Aliyun deepseek-r1 reasoning parsing with oneapi, closes [#5964](https://github.com/lobehub/lobe-chat/issues/5964) ([0d7e665](https://github.com/lobehub/lobe-chat/commit/0d7e665)) +- **misc**: Support Aliyun deepseek-r1 reasoning, closes [#5954](https://github.com/lobehub/lobe-chat/issues/5954) ([cf7a2d6](https://github.com/lobehub/lobe-chat/commit/cf7a2d6)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.52.12](https://github.com/lobehub/lobe-chat/compare/v1.52.11...v1.52.12) + +Released on **2025-02-10** + +#### 🐛 Bug Fixes + +- **misc**: Fix language incorrect on page hydration. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix language incorrect on page hydration, closes [#5970](https://github.com/lobehub/lobe-chat/issues/5970) ([91912cf](https://github.com/lobehub/lobe-chat/commit/91912cf)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ ### [Version 1.52.11](https://github.com/lobehub/lobe-chat/compare/v1.52.10...v1.52.11) Released on **2025-02-10** diff --git a/changelog/v1.json b/changelog/v1.json index f1185c7f0df11..6de1eed30d4ea 100644 --- a/changelog/v1.json +++ b/changelog/v1.json @@ -1,4 +1,35 @@ [ + { + "children": { + "fixes": ["Fix lmstudio baseURL."], + "improvements": ["Optimized MaxToken Slider."] + }, + "date": "2025-02-10", + "version": "1.52.15" + }, + { + "children": { + "improvements": ["Refactor agent settings modal."] + }, + "date": "2025-02-10", + "version": "1.52.14" + }, + { + "children": { + "fixes": [ + "Fix Aliyun deepseek-r1 reasoning parsing with oneapi, Support Aliyun deepseek-r1 reasoning." + ] + }, + "date": "2025-02-10", + "version": "1.52.13" + }, + { + "children": { + "fixes": ["Fix language incorrect on page hydration."] + }, + "date": "2025-02-10", + "version": "1.52.12" + }, { "children": { "improvements": ["Support Mermaid in Artifacts."] diff --git a/docker-compose/local/docker-compose.yml b/docker-compose/local/docker-compose.yml index 631cf9687b257..f699f6e2907ed 100644 --- a/docker-compose/local/docker-compose.yml +++ b/docker-compose/local/docker-compose.yml @@ -103,6 +103,30 @@ services: env_file: - .env restart: always + entrypoint: > + /bin/sh -c " + /bin/node /app/startServer.js & + LOBE_PID=\$! + sleep 3 + if [ $(wget --timeout=5 --spider --server-response ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration 2>&1 | grep -c 'HTTP/1.1 200 OK') -eq 0 ]; then + echo '⚠️Warining: Unable to fetch OIDC configuration from Casdoor' + echo 'Request URL: ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration' + echo 'Read more at: https://lobehub.com/docs/self-hosting/server-database/docker-compose#necessary-configuration' + else + if ! wget -O - --timeout=5 ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration 2>&1 | grep 'issuer' | grep ${AUTH_CASDOOR_ISSUER}; then + printf '❌Error: The Auth issuer is conflict, Issuer in OIDC configuration is: %s' \$(wget -O - --timeout=5 ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration 2>&1 | grep -E 'issuer.*' | awk -F '\"' '{print \$4}') + echo ' , but the issuer in .env file is: ${AUTH_CASDOOR_ISSUER} ' + echo 'Request URL: ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration' + echo 'Read more at: https://lobehub.com/docs/self-hosting/server-database/docker-compose#necessary-configuration' + fi + fi + if [ $(wget --timeout=5 --spider --server-response ${S3_ENDPOINT}/minio/health/live 2>&1 | grep -c 'HTTP/1.1 200 OK') -eq 0 ]; then + echo '⚠️Warining: Unable to fetch MinIO health status' + echo 'Request URL: ${S3_ENDPOINT}/minio/health/live' + echo 'Read more at: https://lobehub.com/docs/self-hosting/server-database/docker-compose#necessary-configuration' + fi + wait \$LOBE_PID + " volumes: data: diff --git a/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx b/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx index cc4081684940c..b5d27ea3e5815 100644 --- a/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx +++ b/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx @@ -107,13 +107,13 @@ If you are deploying using a public network, the following assumptions apply: Configure the Casdoor webhook so that LobeChat can receive notifications when user information is updated. - Go to `Admin ` -> `Webhooks`, add a webhook, and fill in the following fields: + Go to `Admin` -> `Webhooks`, add a webhook, and fill in the following fields: - URL: `https://lobe.example.com/api/auth/webhooks/casdoor` - Method: `POST` - Content Type: `application/json` - Headers: `casdoor-secret`: `Your Webhook Secret` - > The webhook is generated by yourself, you can visit https://generate-secret.vercel.app/10 to generate a 10 bit secret. + > The secret is generated by yourself, you can visit https://generate-secret.vercel.app/10 to generate a 10 bit secret. - Event: `update-user` - Is user extented: `true` diff --git a/docs/self-hosting/environment-variables/auth.zh-CN.mdx b/docs/self-hosting/environment-variables/auth.zh-CN.mdx index 3aa77411dae5e..bf54c62ba08fc 100644 --- a/docs/self-hosting/environment-variables/auth.zh-CN.mdx +++ b/docs/self-hosting/environment-variables/auth.zh-CN.mdx @@ -47,7 +47,7 @@ LobeChat 在部署时提供了完善的身份验证服务能力,以下是相 - 默认值: `-` - 示例: `evCnOJP1UX8FMnXR9Xkj5t0NyFn5p70P` -#### `AUTH_AUTH_SECRET` +#### `AUTH_AUTH0_SECRET` - 类型:必选 - 描述: Auth0 应用程序的 Client Secret @@ -280,4 +280,4 @@ LobeChat 在部署时提供了完善的身份验证服务能力,以下是相 - 类型:必选 - 描述: Clerk 应用程序的 Secret key。您可以在[这里](https://dashboard.clerk.com)访问,并导航到 API Keys 以查看。 - 默认值:`-` -- 示例: `sk_test_513Ma0P7IAWM1XMv4waxZjRYRajWTaCfJLjpEO3SD2` (测试环境) / `sk_live_eMMlHjwJvZFUfczFljSKqZdwQtLvmczmsJSNmdrpeZ`(生产环境) +- 示例: `sk_test_513Ma0P7IAWM1XMv4waxZjRYRajWTaCfJLjpEO3SD2` (测试环境) / `sk_live_eMMlHjwJvZFUfczFljSKqZdwQtLvmczmsJSNmdrpeZ`(生产环境) \ No newline at end of file diff --git a/docs/self-hosting/platform/btpanel.mdx b/docs/self-hosting/platform/btpanel.mdx index 53cebc1e5e7e5..c155fa6e10960 100644 --- a/docs/self-hosting/platform/btpanel.mdx +++ b/docs/self-hosting/platform/btpanel.mdx @@ -36,6 +36,10 @@ To install aaPanel, go to the [aaPanel](https://www.aapanel.com/new/download.htm 6. After submission, the panel will automatically initialize the application, which will take about `1-3` minutes. It can be accessed after the initialization is completed. + + ⚠️ Do not enable any form of cache in the reverse proxy settings of the panel to avoid affecting the normal operation of the service. Read more at https://github.com/lobehub/lobe-chat/discussions/5986 + + ## Visit LobeChat - If you have set a domain name, please directly enter the domain name in the browser address bar, such as `http://demo.lobechat`, to access the `LobeChat` console. diff --git a/docs/self-hosting/platform/btpanel.zh-CN.mdx b/docs/self-hosting/platform/btpanel.zh-CN.mdx index 8f088d2fca41e..8497c914e0da9 100644 --- a/docs/self-hosting/platform/btpanel.zh-CN.mdx +++ b/docs/self-hosting/platform/btpanel.zh-CN.mdx @@ -40,6 +40,10 @@ tags: 5. 提交后面板会自动进行应用初始化,大概需要`1-3`分钟,初始化完成后即可访问。 + + ⚠️ 请不要在面板的反向代理设置中开启任何形式的缓存,以免影响服务的正常运行。详情请见 https://github.com/lobehub/lobe-chat/discussions/5986 + + ## 访问 LobeChat - 如果您填写域名,请在浏览器输入您的域名访问,如`http://demo.lobechat`,即可访问 `LobeChat` 页面。 diff --git a/docs/self-hosting/server-database/docker-compose.mdx b/docs/self-hosting/server-database/docker-compose.mdx index 53d8276c2d469..051a2d4924b03 100644 --- a/docs/self-hosting/server-database/docker-compose.mdx +++ b/docs/self-hosting/server-database/docker-compose.mdx @@ -226,6 +226,10 @@ The script supports the following deployment modes; please choose the appropriat proxy_set_header X-Forwarded-Proto $scheme; # Keep the request protocol } ``` + + ⚠️ If you are using such panel software, + please do not enable any form of caching in the reverse proxy settings of such panel software to avoid affecting the normal operation of the service. + Read more at https://github.com/lobehub/lobe-chat/discussions/5986 ### Complete Remaining Configuration in Interactive Script diff --git a/docs/self-hosting/server-database/docker-compose.zh-CN.mdx b/docs/self-hosting/server-database/docker-compose.zh-CN.mdx index 763b7c4fd0f09..4f6b1d1402c33 100644 --- a/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +++ b/docs/self-hosting/server-database/docker-compose.zh-CN.mdx @@ -224,6 +224,9 @@ bash <(curl -fsSL https://lobe.li/setup.sh) -l zh_CN proxy_set_header X-Forwarded-Proto $scheme; # 保留请求协议 } ``` + + ⚠️ 请不要在此类面板软件的反向代理设置中开启任何形式的缓存,以免影响服务的正常运行。 + 详情请见 https://github.com/lobehub/lobe-chat/discussions/5986 ### 在交互式脚本中完成剩余配置 diff --git a/package.json b/package.json index d8365a08bdfed..c4ef493b7282f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lobehub/chat", - "version": "1.52.11", + "version": "1.52.15", "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", diff --git a/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/AgentsSuggest.tsx b/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/AgentsSuggest.tsx index 78fd1728bb0f6..f4422780c9ce2 100644 --- a/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/AgentsSuggest.tsx +++ b/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/AgentsSuggest.tsx @@ -12,8 +12,8 @@ import useSWR from 'swr'; import urlJoin from 'url-join'; import { assistantService } from '@/services/assistant'; -import { useUserStore } from '@/store/user'; -import { userGeneralSettingsSelectors } from '@/store/user/selectors'; +import { useGlobalStore } from '@/store/global'; +import { globalGeneralSelectors } from '@/store/global/selectors'; import { DiscoverAssistantItem } from '@/types/discover'; const { Paragraph } = Typography; @@ -60,7 +60,7 @@ const useStyles = createStyles(({ css, token, responsive }) => ({ const AgentsSuggest = memo<{ mobile?: boolean }>(({ mobile }) => { const { t } = useTranslation('welcome'); - const locale = useUserStore(userGeneralSettingsSelectors.currentLanguage); + const locale = useGlobalStore(globalGeneralSelectors.currentLanguage); const [sliceStart, setSliceStart] = useState(0); const { data: assistantList, isLoading } = useSWR( diff --git a/src/app/[variants]/@modal/chat/(.)settings/modal/features/CategoryContent.tsx b/src/app/[variants]/(main)/chat/(workspace)/features/AgentSettings/CategoryContent/index.tsx similarity index 68% rename from src/app/[variants]/@modal/chat/(.)settings/modal/features/CategoryContent.tsx rename to src/app/[variants]/(main)/chat/(workspace)/features/AgentSettings/CategoryContent/index.tsx index fac656b4fe921..1560849079722 100644 --- a/src/app/[variants]/@modal/chat/(.)settings/modal/features/CategoryContent.tsx +++ b/src/app/[variants]/(main)/chat/(workspace)/features/AgentSettings/CategoryContent/index.tsx @@ -5,22 +5,23 @@ import { Flexbox } from 'react-layout-kit'; import HeaderContent from '@/app/[variants]/(main)/chat/settings/features/HeaderContent'; import Menu from '@/components/Menu'; -import { useChatSettingsTab } from '@/hooks/useChatSettingsTab'; -import { useQueryRoute } from '@/hooks/useQueryRoute'; +import { ChatSettingsTabs } from '@/store/global/initialState'; import { useCategory } from './useCategory'; -const CategoryContent = memo(() => { +interface CategoryContentProps { + setTab: (tab: ChatSettingsTabs) => void; + tab: string; +} +const CategoryContent = memo(({ setTab, tab }) => { const cateItems = useCategory(); - const tab = useChatSettingsTab(); - const router = useQueryRoute(); return ( <> { - router.replace('/chat/settings/modal', { query: { tab: key } }); + setTab(key as ChatSettingsTabs); }} selectable selectedKeys={[tab as any]} diff --git a/src/app/[variants]/@modal/chat/(.)settings/modal/features/useCategory.tsx b/src/app/[variants]/(main)/chat/(workspace)/features/AgentSettings/CategoryContent/useCategory.tsx similarity index 100% rename from src/app/[variants]/@modal/chat/(.)settings/modal/features/useCategory.tsx rename to src/app/[variants]/(main)/chat/(workspace)/features/AgentSettings/CategoryContent/useCategory.tsx diff --git a/src/app/[variants]/(main)/chat/(workspace)/features/AgentSettings/index.tsx b/src/app/[variants]/(main)/chat/(workspace)/features/AgentSettings/index.tsx new file mode 100644 index 0000000000000..6958aafeec15c --- /dev/null +++ b/src/app/[variants]/(main)/chat/(workspace)/features/AgentSettings/index.tsx @@ -0,0 +1,114 @@ +'use client'; + +import { Drawer } from 'antd'; +import { useResponsive, useTheme } from 'antd-style'; +import isEqual from 'fast-deep-equal'; +import { memo, useRef, useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import { Flexbox } from 'react-layout-kit'; + +import Header from '@/app/[variants]/(main)/settings/_layout/Desktop/Header'; +import AgentChat from '@/features/AgentSetting/AgentChat'; +import AgentMeta from '@/features/AgentSetting/AgentMeta'; +import AgentModal from '@/features/AgentSetting/AgentModal'; +import AgentPlugin from '@/features/AgentSetting/AgentPlugin'; +import AgentPrompt from '@/features/AgentSetting/AgentPrompt'; +import AgentTTS from '@/features/AgentSetting/AgentTTS'; +import StoreUpdater from '@/features/AgentSetting/StoreUpdater'; +import { Provider, createStore } from '@/features/AgentSetting/store'; +import Footer from '@/features/Setting/Footer'; +import { useAgentStore } from '@/store/agent'; +import { agentSelectors } from '@/store/agent/slices/chat'; +import { ChatSettingsTabs } from '@/store/global/initialState'; +import { useSessionStore } from '@/store/session'; +import { sessionMetaSelectors } from '@/store/session/selectors'; + +import CategoryContent from './CategoryContent'; + +const AgentSettings = memo(() => { + const { t } = useTranslation('setting'); + const id = useSessionStore((s) => s.activeId); + const config = useAgentStore(agentSelectors.currentAgentConfig, isEqual); + const meta = useSessionStore(sessionMetaSelectors.currentAgentMeta, isEqual); + const [showAgentSetting, updateAgentConfig] = useAgentStore((s) => [ + s.showAgentSetting, + s.updateAgentConfig, + ]); + const [updateAgentMeta] = useSessionStore((s) => [ + s.updateSessionMeta, + sessionMetaSelectors.currentAgentTitle(s), + ]); + + const [tab, setTab] = useState(ChatSettingsTabs.Meta); + + const ref = useRef(null); + const theme = useTheme(); + const { md = true, mobile = false } = useResponsive(); + + const category = ; + return ( + + + { + useAgentStore.setState({ showAgentSetting: false }); + }} + open={showAgentSetting} + placement={'bottom'} + styles={{ + body: { padding: 0 }, + content: { + background: theme.colorBgContainer, + }, + }} + title={t('header.session')} + > + + {md ? ( + {category} + ) : ( +
ref.current} + title={t(`agentTab.${tab as ChatSettingsTabs}`)} + > + {category} +
+ )} + + {tab === ChatSettingsTabs.Meta && } + {tab === ChatSettingsTabs.Prompt && } + {tab === ChatSettingsTabs.Chat && } + {tab === ChatSettingsTabs.Modal && } + {tab === ChatSettingsTabs.TTS && } + {tab === ChatSettingsTabs.Plugin && }