@lobehub/chat 1.51.13 → 1.51.15

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 CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.51.15](https://github.com/lobehub/lobe-chat/compare/v1.51.14...v1.51.15)
6
+
7
+ <sup>Released on **2025-02-07**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix home next auth error and update pnpm.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix home next auth error and update pnpm, closes [#5833](https://github.com/lobehub/lobe-chat/issues/5833) ([aa74d20](https://github.com/lobehub/lobe-chat/commit/aa74d20))
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.51.14](https://github.com/lobehub/lobe-chat/compare/v1.51.13...v1.51.14)
31
+
32
+ <sup>Released on **2025-02-07**</sup>
33
+
34
+ #### ♻ Code Refactoring
35
+
36
+ - **misc**: Update changelog cache and upgrade anthropic sdk.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Code refactoring
44
+
45
+ - **misc**: Update changelog cache and upgrade anthropic sdk, closes [#5829](https://github.com/lobehub/lobe-chat/issues/5829) ([620df2f](https://github.com/lobehub/lobe-chat/commit/620df2f))
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.51.13](https://github.com/lobehub/lobe-chat/compare/v1.51.12...v1.51.13)
6
56
 
7
57
  <sup>Released on **2025-02-07**</sup>
@@ -49,6 +49,7 @@ ARG NEXT_PUBLIC_UMAMI_WEBSITE_ID
49
49
  ENV NEXT_PUBLIC_BASE_PATH="${NEXT_PUBLIC_BASE_PATH}"
50
50
 
51
51
  ENV NEXT_PUBLIC_SERVICE_MODE="${NEXT_PUBLIC_SERVICE_MODE:-server}" \
52
+ NEXT_PUBLIC_ENABLE_NEXT_AUTH="1" \
52
53
  APP_URL="http://app.com" \
53
54
  DATABASE_DRIVER="node" \
54
55
  DATABASE_URL="postgres://postgres:password@localhost:5432/postgres" \
package/changelog/v1.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Fix home next auth error and update pnpm."
6
+ ]
7
+ },
8
+ "date": "2025-02-07",
9
+ "version": "1.51.15"
10
+ },
11
+ {
12
+ "children": {
13
+ "improvements": [
14
+ "Update changelog cache and upgrade anthropic sdk."
15
+ ]
16
+ },
17
+ "date": "2025-02-07",
18
+ "version": "1.51.14"
19
+ },
2
20
  {
3
21
  "children": {
4
22
  "fixes": [
@@ -76,7 +76,7 @@ services:
76
76
  - .env
77
77
 
78
78
  lobe:
79
- image: lobehub/lobe-chat-database
79
+ image: lobehub/lobe-chat-database:1.51.3
80
80
  container_name: lobe-chat
81
81
  network_mode: 'service:network-service'
82
82
  depends_on:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.51.13",
3
+ "version": "1.51.15",
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",
@@ -104,7 +104,7 @@
104
104
  "dependencies": {
105
105
  "@ant-design/icons": "^5.5.2",
106
106
  "@ant-design/pro-components": "^2.8.3",
107
- "@anthropic-ai/sdk": "^0.33.1",
107
+ "@anthropic-ai/sdk": "^0.36.3",
108
108
  "@auth/core": "^0.37.4",
109
109
  "@aws-sdk/client-bedrock-runtime": "^3.723.0",
110
110
  "@aws-sdk/client-s3": "^3.723.0",
@@ -317,7 +317,7 @@
317
317
  "vitest": "~1.2.2",
318
318
  "vitest-canvas-mock": "^0.3.3"
319
319
  },
320
- "packageManager": "pnpm@9.15.4",
320
+ "packageManager": "pnpm@10.2.0",
321
321
  "publishConfig": {
322
322
  "access": "public",
323
323
  "registry": "https://registry.npmjs.org"
@@ -217,7 +217,8 @@ export const getAuthConfig = () => {
217
217
  CLERK_WEBHOOK_SECRET: process.env.CLERK_WEBHOOK_SECRET,
218
218
 
219
219
  // Next Auth
220
- NEXT_PUBLIC_ENABLE_NEXT_AUTH: !!process.env.NEXT_AUTH_SECRET,
220
+ NEXT_PUBLIC_ENABLE_NEXT_AUTH:
221
+ !!process.env.NEXT_AUTH_SECRET || process.env.NEXT_PUBLIC_ENABLE_NEXT_AUTH === '1',
221
222
  NEXT_AUTH_SSO_PROVIDERS: process.env.NEXT_AUTH_SSO_PROVIDERS,
222
223
  NEXT_AUTH_SECRET: process.env.NEXT_AUTH_SECRET,
223
224
  NEXT_AUTH_DEBUG: !!process.env.NEXT_AUTH_DEBUG,
@@ -0,0 +1,3 @@
1
+ export enum FetchCacheTag {
2
+ Changelog = 'changelog',
3
+ }
@@ -11,7 +11,8 @@ export const buildAnthropicBlock = async (
11
11
  ): Promise<Anthropic.ContentBlock | Anthropic.ImageBlockParam> => {
12
12
  switch (content.type) {
13
13
  case 'text': {
14
- return content;
14
+ // just pass-through the content
15
+ return content as any;
15
16
  }
16
17
 
17
18
  case 'image_url': {
@@ -4,6 +4,7 @@ import { markdownToTxt } from 'markdown-to-txt';
4
4
  import semver from 'semver';
5
5
  import urlJoin from 'url-join';
6
6
 
7
+ import { FetchCacheTag } from '@/const/cacheControl';
7
8
  import { Locales } from '@/locales/resources';
8
9
  import { ChangelogIndexItem } from '@/types/changelog';
9
10
 
@@ -47,7 +48,9 @@ export class ChangelogService {
47
48
  try {
48
49
  const url = this.genUrl(urlJoin(this.config.docsPath, 'index.json'));
49
50
 
50
- const res = await fetch(url);
51
+ const res = await fetch(url, {
52
+ next: { revalidate: 3600, tags: [FetchCacheTag.Changelog] },
53
+ });
51
54
 
52
55
  const data = await res.json();
53
56
 
@@ -79,7 +82,10 @@ export class ChangelogService {
79
82
  const filename = options?.locale?.startsWith('zh') ? `${id}.zh-CN.mdx` : `${id}.mdx`;
80
83
  const url = this.genUrl(urlJoin(this.config.docsPath, filename));
81
84
 
82
- const response = await fetch(url);
85
+ const response = await fetch(url, {
86
+ next: { revalidate: 3600, tags: [FetchCacheTag.Changelog] },
87
+ });
88
+
83
89
  const text = await response.text();
84
90
  const { data, content } = matter(text);
85
91
 
@@ -122,8 +128,10 @@ export class ChangelogService {
122
128
  content: description,
123
129
  rawTitle: match ? match[1] : '',
124
130
  };
125
- } catch {
126
- console.error('Error getting changlog post by id', id);
131
+ } catch (e) {
132
+ console.error('[ChangelogFetchError]failed to fetch changlog post', id);
133
+ console.error(e);
134
+
127
135
  return false as any;
128
136
  }
129
137
  }