@lobehub/lobehub 2.0.0-next.168 → 2.0.0-next.169

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,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 2.0.0-next.169](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.168...v2.0.0-next.169)
6
+
7
+ <sup>Released on **2025-12-12**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix CVE errors.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix CVE errors, closes [#10748](https://github.com/lobehub/lobe-chat/issues/10748) ([6591f3c](https://github.com/lobehub/lobe-chat/commit/6591f3c))
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
+
5
30
  ## [Version 2.0.0-next.168](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.167...v2.0.0-next.168)
6
31
 
7
32
  <sup>Released on **2025-12-12**</sup>
package/README.md CHANGED
@@ -352,7 +352,7 @@ In addition, these plugins are not limited to news aggregation, but can also ext
352
352
  | [SEO](https://lobechat.com/discover/plugin/SEO)<br/><sup>By **orrenprunckun** on **2025-11-14**</sup> | Enter any URL and keyword and get an On-Page SEO analysis & insights!<br/>`seo` |
353
353
  | [Shopping tools](https://lobechat.com/discover/plugin/ShoppingTools)<br/><sup>By **shoppingtools** on **2025-10-27**</sup> | Search for products on eBay & AliExpress, find eBay events & coupons. Get prompt examples.<br/>`shopping` `e-bay` `ali-express` `coupons` |
354
354
 
355
- > 📊 Total plugins: [<kbd>**41**</kbd>](https://lobechat.com/discover/plugins)
355
+ > 📊 Total plugins: [<kbd>**37**</kbd>](https://lobechat.com/discover/plugins)
356
356
 
357
357
  <!-- PLUGIN LIST -->
358
358
 
package/README.zh-CN.md CHANGED
@@ -345,7 +345,7 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
345
345
  | [SEO](https://lobechat.com/discover/plugin/SEO)<br/><sup>By **orrenprunckun** on **2025-11-14**</sup> | 输入任何 URL 和关键词,获取页面 SEO 分析和见解!<br/>`seo` |
346
346
  | [购物工具](https://lobechat.com/discover/plugin/ShoppingTools)<br/><sup>By **shoppingtools** on **2025-10-27**</sup> | 在 eBay 和 AliExpress 上搜索产品,查找 eBay 活动和优惠券。获取快速示例。<br/>`购物` `e-bay` `ali-express` `优惠券` |
347
347
 
348
- > 📊 Total plugins: [<kbd>**41**</kbd>](https://lobechat.com/discover/plugins)
348
+ > 📊 Total plugins: [<kbd>**37**</kbd>](https://lobechat.com/discover/plugins)
349
349
 
350
350
  <!-- PLUGIN LIST -->
351
351
 
package/changelog/v1.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Fix CVE errors."
6
+ ]
7
+ },
8
+ "date": "2025-12-12",
9
+ "version": "2.0.0-next.169"
10
+ },
2
11
  {
3
12
  "children": {
4
13
  "fixes": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/lobehub",
3
- "version": "2.0.0-next.168",
3
+ "version": "2.0.0-next.169",
4
4
  "description": "LobeHub - an open-source,comprehensive AI Agent 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",
@@ -243,7 +243,7 @@
243
243
  "mdast-util-to-markdown": "^2.1.2",
244
244
  "model-bank": "workspace:*",
245
245
  "nanoid": "^5.1.6",
246
- "next": "^16.0.8",
246
+ "next": "^16.0.10",
247
247
  "next-auth": "5.0.0-beta.30",
248
248
  "next-mdx-remote": "^5.0.0",
249
249
  "nextjs-toploader": "^3.9.17",
@@ -271,10 +271,10 @@
271
271
  "query-string": "^9.3.1",
272
272
  "random-words": "^2.0.1",
273
273
  "rc-util": "^5.44.4",
274
- "react": "^19.2.1",
274
+ "react": "^19.2.3",
275
275
  "react-confetti": "^6.4.0",
276
276
  "react-diff-view": "^3.3.2",
277
- "react-dom": "^19.2.1",
277
+ "react-dom": "^19.2.3",
278
278
  "react-fast-marquee": "^1.6.5",
279
279
  "react-hotkeys-hook": "^5.2.1",
280
280
  "react-i18next": "^15.7.4",
@@ -6,7 +6,7 @@ import type { DocumentPage, FileLoaderInterface } from '../../types';
6
6
  const log = debug('file-loaders:text');
7
7
 
8
8
  /**
9
- * 用于加载纯文本文件的加载器。
9
+ * Loader for loading plain text files.
10
10
  */
11
11
  export class TextLoader implements FileLoaderInterface {
12
12
  async loadPages(filePath: string): Promise<DocumentPage[]> {
@@ -35,7 +35,7 @@ export class TextLoader implements FileLoaderInterface {
35
35
  const error = e as Error;
36
36
  log('Error encountered while loading text file');
37
37
  console.error(`Error loading text file ${filePath}: ${error.message}`);
38
- // 如果读取失败,返回一个包含错误信息的 Page
38
+ // If reading fails, return a Page containing error information
39
39
  const errorPage: DocumentPage = {
40
40
  charCount: 0,
41
41
  lineCount: 0,
@@ -50,14 +50,14 @@ export class TextLoader implements FileLoaderInterface {
50
50
  }
51
51
 
52
52
  /**
53
- * 对于纯文本,简单地连接所有页面的内容。
54
- * (虽然 TextLoader 通常只有一个页面,但保持接口一致性)
55
- * @param pages 页面数组
56
- * @returns 聚合后的内容
53
+ * For plain text, simply concatenate the content of all pages.
54
+ * (Although TextLoader typically has only one page, this maintains interface consistency)
55
+ * @param pages Array of pages
56
+ * @returns Aggregated content
57
57
  */
58
58
  async aggregateContent(pages: DocumentPage[]): Promise<string> {
59
59
  log('Aggregating content from', pages.length, 'text pages');
60
- // 默认使用换行符连接,可以根据需要调整或使其可配置
60
+ // By default, join with newline separator, can be adjusted or made configurable as needed
61
61
  const result = pages.map((page) => page.pageContent).join('\n');
62
62
  log('Content aggregated successfully, length:', result.length);
63
63
  return result;
@@ -2,199 +2,199 @@
2
2
  export type SupportedFileType = 'pdf' | 'doc' | 'docx' | 'txt' | 'excel' | 'pptx'; // | 'pptx' | 'latex' | 'epub' | 'code' | 'markdown';
3
3
 
4
4
  /**
5
- * 代表一个完整的已加载文件,包含文件级信息和其所有页面/块。
5
+ * Represents a complete loaded file, including file-level information and all its pages/chunks.
6
6
  */
7
7
  export interface FileDocument {
8
8
  /**
9
- * 文件内容
9
+ * File content
10
10
  */
11
11
  content: string;
12
12
 
13
13
  /**
14
- * 文件创建时间戳。
14
+ * File creation timestamp.
15
15
  */
16
16
  createdTime: Date;
17
17
 
18
18
  /**
19
- * 文件类型或扩展名。
19
+ * File type or extension.
20
20
  */
21
21
  fileType: string;
22
22
 
23
23
  /**
24
- * 原始文件名。
24
+ * Original filename.
25
25
  */
26
26
  filename: string;
27
27
 
28
28
  /**
29
- * 文件级别的元数据。
30
- * 例如从文件属性中提取的标题、作者,或整个文件加载失败时的错误。
29
+ * File-level metadata.
30
+ * For example, title and author extracted from file properties, or errors when the entire file loading fails.
31
31
  */
32
32
  metadata: {
33
33
  /**
34
- * 允许添加其他文件级别的元数据。
34
+ * Allows adding other file-level metadata.
35
35
  */
36
36
  [key: string]: any;
37
37
  /**
38
- * 文档作者 (如果可用)
38
+ * Document author (if available).
39
39
  */
40
40
  author?: string;
41
41
  /**
42
- * 如果整个文件加载失败,记录错误信息。
42
+ * If the entire file loading fails, record error information.
43
43
  */
44
44
  error?: string;
45
45
  /**
46
- * 文档标题 (如果可用)
46
+ * Document title (if available).
47
47
  */
48
48
  title?: string;
49
49
  };
50
50
 
51
51
  /**
52
- * 文件最后修改时间戳。
52
+ * File last modified timestamp.
53
53
  */
54
54
  modifiedTime: Date;
55
55
 
56
56
  /**
57
- * 包含文档中所有逻辑页面/块的数组。
58
- * 顺序通常对应文件中的自然顺序。
57
+ * Array containing all logical pages/chunks in the document.
58
+ * The order typically corresponds to the natural order in the file.
59
59
  */
60
60
  pages?: DocumentPage[];
61
61
 
62
62
  /**
63
- * 原始文件的完整路径。
63
+ * Full path of the original file.
64
64
  */
65
65
  source: string;
66
66
 
67
67
  /**
68
- * 整个文档的总字符数 (所有 Page charCount 之和)
69
- * 需要在所有 Page 加载和计算后得出。
68
+ * Total character count of the entire document (sum of all Page charCounts).
69
+ * Needs to be calculated after all Pages are loaded and computed.
70
70
  */
71
71
  totalCharCount: number;
72
72
 
73
73
  /**
74
- * 整个文档的总行数 (所有 Page lineCount 之和)
75
- * 需要在所有 Page 加载和计算后得出。
74
+ * Total line count of the entire document (sum of all Page lineCounts).
75
+ * Needs to be calculated after all Pages are loaded and computed.
76
76
  */
77
77
  totalLineCount: number;
78
78
  }
79
79
 
80
80
  /**
81
- * 代表文件中的一个逻辑单元/页面/块。
81
+ * Represents a logical unit/page/chunk in a file.
82
82
  */
83
83
  export interface DocumentPage {
84
84
  /**
85
- * 此页/块内容的字符数。
85
+ * Character count of this page/chunk content.
86
86
  */
87
87
  charCount: number;
88
88
 
89
89
  /**
90
- * 此页/块内容的行数。
90
+ * Line count of this page/chunk content.
91
91
  */
92
92
  lineCount: number;
93
93
 
94
94
  /**
95
- * 与此页/块相关的元数据。
95
+ * Metadata related to this page/chunk.
96
96
  */
97
97
  metadata: {
98
98
  /**
99
- * 允许添加其他特定于页/块的元数据。
99
+ * Allows adding other page/chunk-specific metadata.
100
100
  */
101
101
  [key: string]: any;
102
102
 
103
103
  /**
104
- * 如果原始文件单元被进一步分割成块,这是当前块的索引。
104
+ * If the original file unit is further divided into chunks, this is the index of the current chunk.
105
105
  */
106
106
  chunkIndex?: number;
107
107
 
108
108
  /**
109
- * 处理此页/块时发生的错误。
109
+ * Error that occurred when processing this page/chunk.
110
110
  */
111
111
  error?: string;
112
112
 
113
113
  /**
114
- * 此页/块在原始文件中的结束行号。
114
+ * Ending line number of this page/chunk in the original file.
115
115
  */
116
116
  lineNumberEnd?: number;
117
117
 
118
118
  /**
119
- * 此页/块在原始文件中的起始行号。
119
+ * Starting line number of this page/chunk in the original file.
120
120
  */
121
121
  lineNumberStart?: number;
122
122
 
123
123
  /**
124
- * 页码 (适用于 PDF, DOCX)
124
+ * Page number (applicable for PDF, DOCX).
125
125
  */
126
126
  pageNumber?: number;
127
127
 
128
128
  /**
129
- * 与此页/块相关的章节标题。
129
+ * Section title related to this page/chunk.
130
130
  */
131
131
  sectionTitle?: string;
132
132
 
133
133
  /**
134
- * 工作表名称 (适用于 XLSX)
134
+ * Sheet name (applicable for XLSX).
135
135
  */
136
136
  sheetName?: string;
137
137
 
138
138
  /**
139
- * 幻灯片编号 (适用于 PPTX)
139
+ * Slide number (applicable for PPTX).
140
140
  */
141
141
  slideNumber?: number;
142
142
 
143
143
  /**
144
- * 如果原始文件单元被进一步分割成块,这是该单元的总块数。
144
+ * If the original file unit is further divided into chunks, this is the total number of chunks for that unit.
145
145
  */
146
146
  totalChunks?: number;
147
147
  };
148
148
 
149
149
  /**
150
- * 此页/块的核心文本内容。
150
+ * Core text content of this page/chunk.
151
151
  */
152
152
  pageContent: string;
153
153
  }
154
154
 
155
155
  /**
156
- * 可选的文件元数据,用于覆盖从文件系统读取的信息。
156
+ * Optional file metadata used to override information read from the filesystem.
157
157
  */
158
158
  export interface FileMetadata {
159
159
  /**
160
- * 文件创建时间戳。
160
+ * File creation timestamp.
161
161
  */
162
162
  createdTime?: Date;
163
163
  /**
164
- * 文件类型或扩展名。
164
+ * File type or extension.
165
165
  */
166
166
  fileType?: string;
167
167
  /**
168
- * 文件名。
168
+ * Filename.
169
169
  */
170
170
  filename?: string;
171
171
  /**
172
- * 文件最后修改时间戳。
172
+ * File last modified timestamp.
173
173
  */
174
174
  modifiedTime?: Date;
175
175
  /**
176
- * 文件来源标识 (例如 S3 URL 或原始路径)
176
+ * File source identifier (e.g., S3 URL or original path).
177
177
  */
178
178
  source?: string;
179
179
  }
180
180
 
181
181
  /**
182
- * 定义所有文件加载器类必须实现的接口。
182
+ * Defines the interface that all file loader classes must implement.
183
183
  */
184
184
  export interface FileLoaderInterface {
185
185
  /**
186
- * 将从 loadPages 获取的页面内容聚合成单一的字符串。
187
- * @param pages DocumentPage 对象的数组。
188
- * @returns 返回聚合后的文本内容的 Promise。
186
+ * Aggregates the page content obtained from loadPages into a single string.
187
+ * @param pages Array of DocumentPage objects.
188
+ * @returns Promise that returns the aggregated text content.
189
189
  */
190
190
  aggregateContent(pages: DocumentPage[]): Promise<string>;
191
191
 
192
192
  attachDocumentMetadata?(filePath: string): Promise<Record<string, any>>;
193
193
 
194
194
  /**
195
- * 根据文件路径加载文件内容,并将其分割为逻辑页面/块。
196
- * @param filePath 文件的完整路径。
197
- * @returns 返回包含 DocumentPage 对象的数组的 Promise。
195
+ * Loads file content based on the file path and splits it into logical pages/chunks.
196
+ * @param filePath Full path of the file.
197
+ * @returns Promise that returns an array containing DocumentPage objects.
198
198
  */
199
199
  loadPages(filePath: string): Promise<DocumentPage[]>;
200
200
  }