@lobehub/chat 1.51.12 → 1.51.14

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.14](https://github.com/lobehub/lobe-chat/compare/v1.51.13...v1.51.14)
6
+
7
+ <sup>Released on **2025-02-07**</sup>
8
+
9
+ #### ♻ Code Refactoring
10
+
11
+ - **misc**: Update changelog cache and upgrade anthropic sdk.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Code refactoring
19
+
20
+ - **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))
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.13](https://github.com/lobehub/lobe-chat/compare/v1.51.12...v1.51.13)
31
+
32
+ <sup>Released on **2025-02-07**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Fix next auth error.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Fix next auth error, closes [#5825](https://github.com/lobehub/lobe-chat/issues/5825) ([4509b7a](https://github.com/lobehub/lobe-chat/commit/4509b7a))
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.12](https://github.com/lobehub/lobe-chat/compare/v1.51.11...v1.51.12)
6
56
 
7
57
  <sup>Released on **2025-02-07**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Update changelog cache and upgrade anthropic sdk."
6
+ ]
7
+ },
8
+ "date": "2025-02-07",
9
+ "version": "1.51.14"
10
+ },
11
+ {
12
+ "children": {
13
+ "fixes": [
14
+ "Fix next auth error."
15
+ ]
16
+ },
17
+ "date": "2025-02-07",
18
+ "version": "1.51.13"
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.12",
3
+ "version": "1.51.14",
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@10.2.0",
320
+ "packageManager": "pnpm@9.15.4",
321
321
  "publishConfig": {
322
322
  "access": "public",
323
323
  "registry": "https://registry.npmjs.org"
@@ -8,3 +8,5 @@ const MainLayout = ServerLayout({ Desktop, Mobile });
8
8
  MainLayout.displayName = 'MainLayout';
9
9
 
10
10
  export default MainLayout;
11
+
12
+ export const dynamic = 'force-dynamic';
@@ -92,3 +92,4 @@ export const generateStaticParams = () => {
92
92
 
93
93
  return variants;
94
94
  };
95
+
@@ -7,3 +7,4 @@ export const metadata: Metadata = {
7
7
  };
8
8
 
9
9
  export { default } from './loading';
10
+
@@ -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
  }