@lobehub/chat 1.141.9 → 1.142.0

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/.env.example CHANGED
@@ -256,6 +256,9 @@ OPENAI_API_KEY=sk-xxxxxxxxx
256
256
  # you need to config the clerk webhook secret key if you want to use the clerk with database
257
257
  #CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx
258
258
 
259
+ # Clear allow origin https://clerk.com/docs/guides/dashboard/dns-domains/satellite-domains
260
+ # Authentication across different domains , use,to splite different origin
261
+ # NEXT_PUBLIC_CLERK_AUTH_ALLOW_ORIGINS='https://market.lobehub.com,https://lobehub.com'
259
262
 
260
263
  # NextAuth related configurations
261
264
  # NEXT_PUBLIC_ENABLE_NEXT_AUTH=1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 1.142.0](https://github.com/lobehub/lobe-chat/compare/v1.141.10...v1.142.0)
6
+
7
+ <sup>Released on **2025-10-24**</sup>
8
+
9
+ #### ✨ Features
10
+
11
+ - **misc**: Use env to control clerk allow origin feature.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's improved
19
+
20
+ - **misc**: Use env to control clerk allow origin feature, closes [#9863](https://github.com/lobehub/lobe-chat/issues/9863) ([490fee0](https://github.com/lobehub/lobe-chat/commit/490fee0))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
30
+ ### [Version 1.141.10](https://github.com/lobehub/lobe-chat/compare/v1.141.9...v1.141.10)
31
+
32
+ <sup>Released on **2025-10-23**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Loadmore not work & navbar not show in pwa.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Loadmore not work & navbar not show in pwa, closes [#9855](https://github.com/lobehub/lobe-chat/issues/9855) ([411f875](https://github.com/lobehub/lobe-chat/commit/411f875))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 1.141.9](https://github.com/lobehub/lobe-chat/compare/v1.141.8...v1.141.9)
6
56
 
7
57
  <sup>Released on **2025-10-23**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "features": [
5
+ "Use env to control clerk allow origin feature."
6
+ ]
7
+ },
8
+ "date": "2025-10-24",
9
+ "version": "1.142.0"
10
+ },
11
+ {
12
+ "children": {
13
+ "fixes": [
14
+ "Loadmore not work & navbar not show in pwa."
15
+ ]
16
+ },
17
+ "date": "2025-10-23",
18
+ "version": "1.141.10"
19
+ },
2
20
  {
3
21
  "children": {
4
22
  "improvements": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.141.9",
3
+ "version": "1.142.0",
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",
@@ -29,12 +29,12 @@ const Client = memo<{ mobile?: boolean }>(() => {
29
29
 
30
30
  return (
31
31
  <>
32
- <Title more={t('home.more')} moreLink={'/discover/assistant'}>
32
+ <Title more={t('home.more')} moreLink={'/assistant'}>
33
33
  {t('home.featuredAssistants')}
34
34
  </Title>
35
35
  <AssistantList data={assistantList.items} rows={4} />
36
36
  <div />
37
- <Title more={t('home.more')} moreLink={'/discover/mcp'}>
37
+ <Title more={t('home.more')} moreLink={'/mcp'}>
38
38
  {t('home.featuredTools')}
39
39
  </Title>
40
40
  <McpList data={mcpList.items} rows={4} />
@@ -29,12 +29,12 @@ const HomePage = memo<{ mobile?: boolean }>(() => {
29
29
 
30
30
  return (
31
31
  <>
32
- <Title more={t('home.more')} moreLink={'/discover/assistant'}>
32
+ <Title more={t('home.more')} moreLink={'/assistant'}>
33
33
  {t('home.featuredAssistants')}
34
34
  </Title>
35
35
  <AssistantList data={assistantList.items} rows={4} />
36
36
  <div />
37
- <Title more={t('home.more')} moreLink={'/discover/mcp'}>
37
+ <Title more={t('home.more')} moreLink={'/mcp'}>
38
38
  {t('home.featuredTools')}
39
39
  </Title>
40
40
  <McpList data={mcpList.items} rows={4} />
@@ -57,7 +57,8 @@ const UrlSynchronizer = () => {
57
57
 
58
58
  // Update browser URL when location changes
59
59
  useEffect(() => {
60
- const newUrl = `/discover${location.pathname}${location.search}`;
60
+ const normalizedPath = location.pathname === '/' ? '' : location.pathname;
61
+ const newUrl = `/discover${normalizedPath}${location.search}`;
61
62
  if (window.location.pathname + window.location.search !== newUrl) {
62
63
  window.history.replaceState({}, '', newUrl);
63
64
  }
@@ -30,6 +30,17 @@ const Clerk = memo(({ children }: PropsWithChildren) => {
30
30
  });
31
31
  }, [count, setCount, isPending, startTransition]);
32
32
 
33
+ const allowedRedirectOrigins = useMemo(() => {
34
+ const rawOrigins = process.env.NEXT_PUBLIC_CLERK_AUTH_ALLOW_ORIGINS;
35
+ if (!rawOrigins) return undefined;
36
+
37
+ const origins = rawOrigins
38
+ .split(',')
39
+ .map((origin) => origin.trim())
40
+ .filter(Boolean);
41
+ return origins.length ? origins : undefined;
42
+ }, []);
43
+
33
44
  const updatedAppearance = useMemo(
34
45
  () => ({
35
46
  ...appearance,
@@ -43,6 +54,7 @@ const Clerk = memo(({ children }: PropsWithChildren) => {
43
54
 
44
55
  return (
45
56
  <ClerkProvider
57
+ allowedRedirectOrigins={allowedRedirectOrigins}
46
58
  appearance={updatedAppearance}
47
59
  localization={localization}
48
60
  signUpUrl={!enableClerkSignUp ? '/login' : '/signup'} // Redirect sign-up to sign-in if disabled