@lobehub/chat 1.52.4 → 1.52.5
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 1.52.5](https://github.com/lobehub/lobe-chat/compare/v1.52.4...v1.52.5)
|
6
|
+
|
7
|
+
<sup>Released on **2025-02-08**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Fix changelog modal.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's fixed
|
19
|
+
|
20
|
+
- **misc**: Fix changelog modal, closes [#5906](https://github.com/lobehub/lobe-chat/issues/5906) ([cbc5967](https://github.com/lobehub/lobe-chat/commit/cbc5967))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
5
30
|
### [Version 1.52.4](https://github.com/lobehub/lobe-chat/compare/v1.52.3...v1.52.4)
|
6
31
|
|
7
32
|
<sup>Released on **2025-02-08**</sup>
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.52.
|
3
|
+
"version": "1.52.5",
|
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",
|
package/src/middleware.ts
CHANGED
@@ -81,8 +81,11 @@ const defaultMiddleware = (request: NextRequest) => {
|
|
81
81
|
});
|
82
82
|
|
83
83
|
const url = new URL(request.url);
|
84
|
-
|
84
|
+
|
85
|
+
// skip all api requests
|
86
|
+
if (['/api', '/trpc', '/webapi'].some((path) => url.pathname.startsWith(path))) {
|
85
87
|
return NextResponse.next();
|
88
|
+
}
|
86
89
|
|
87
90
|
// refs: https://github.com/lobehub/lobe-chat/pull/5866
|
88
91
|
// new handle segment rewrite: /${route}${originalPathname}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import dayjs from 'dayjs';
|
2
2
|
import matter from 'gray-matter';
|
3
|
+
import { template } from 'lodash-es';
|
3
4
|
import { markdownToTxt } from 'markdown-to-txt';
|
4
5
|
import semver from 'semver';
|
5
6
|
import urlJoin from 'url-join';
|
@@ -8,7 +9,7 @@ import { FetchCacheTag } from '@/const/cacheControl';
|
|
8
9
|
import { Locales } from '@/locales/resources';
|
9
10
|
import { ChangelogIndexItem } from '@/types/changelog';
|
10
11
|
|
11
|
-
const
|
12
|
+
const URL_TEMPLATE = 'https://raw.githubusercontent.com/{{user}}/{{repo}}/{{branch}}/{{path}}';
|
12
13
|
const LAST_MODIFIED = new Date().toISOString();
|
13
14
|
|
14
15
|
const docCdnPrefix = process.env.DOC_S3_PUBLIC_DOMAIN || '';
|
@@ -21,6 +22,7 @@ export interface ChangelogConfig {
|
|
21
22
|
majorVersion: number;
|
22
23
|
repo: string;
|
23
24
|
type: 'cloud' | 'community';
|
25
|
+
urlTemplate: string;
|
24
26
|
user: string;
|
25
27
|
}
|
26
28
|
|
@@ -36,6 +38,7 @@ export class ChangelogService {
|
|
36
38
|
majorVersion: 1,
|
37
39
|
repo: 'lobe-chat',
|
38
40
|
type: 'cloud',
|
41
|
+
urlTemplate: process.env.CHANGELOG_URL_TEMPLATE || URL_TEMPLATE,
|
39
42
|
user: 'lobehub',
|
40
43
|
};
|
41
44
|
|
@@ -178,7 +181,10 @@ export class ChangelogService {
|
|
178
181
|
}
|
179
182
|
|
180
183
|
private genUrl(path: string) {
|
181
|
-
|
184
|
+
// 自定义分隔符为 {{}}
|
185
|
+
const compiledTemplate = template(this.config.urlTemplate, { interpolate: /{{([\S\s]+?)}}/g });
|
186
|
+
|
187
|
+
return compiledTemplate({ ...this.config, path });
|
182
188
|
}
|
183
189
|
|
184
190
|
private extractHttpsLinks(text: string) {
|