@lobehub/chat 1.35.3 → 1.35.4
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,23 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.35.4](https://github.com/lobehub/lobe-chat/compare/v1.35.3...v1.35.4)
|
6
|
+
|
7
|
+
<sup>Released on **2024-12-02**</sup>
|
8
|
+
|
9
|
+
<br/>
|
10
|
+
|
11
|
+
<details>
|
12
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
13
|
+
|
14
|
+
</details>
|
15
|
+
|
16
|
+
<div align="right">
|
17
|
+
|
18
|
+
[](#readme-top)
|
19
|
+
|
20
|
+
</div>
|
21
|
+
|
5
22
|
### [Version 1.35.3](https://github.com/lobehub/lobe-chat/compare/v1.35.2...v1.35.3)
|
6
23
|
|
7
24
|
<sup>Released on **2024-12-01**</sup>
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.35.
|
3
|
+
"version": "1.35.4",
|
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",
|
@@ -24,7 +24,7 @@ describe('getServerConfig', () => {
|
|
24
24
|
describe('index url', () => {
|
25
25
|
it('should return default URLs when no environment variables are set', () => {
|
26
26
|
const config = getAppConfig();
|
27
|
-
expect(config.AGENTS_INDEX_URL).toBe('https://
|
27
|
+
expect(config.AGENTS_INDEX_URL).toBe('https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public');
|
28
28
|
expect(config.PLUGINS_INDEX_URL).toBe('https://chat-plugins.lobehub.com');
|
29
29
|
});
|
30
30
|
|
@@ -41,7 +41,7 @@ describe('getServerConfig', () => {
|
|
41
41
|
process.env.PLUGINS_INDEX_URL = '';
|
42
42
|
|
43
43
|
const config = getAppConfig();
|
44
|
-
expect(config.AGENTS_INDEX_URL).toBe('https://
|
44
|
+
expect(config.AGENTS_INDEX_URL).toBe('https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public');
|
45
45
|
expect(config.PLUGINS_INDEX_URL).toBe('https://chat-plugins.lobehub.com');
|
46
46
|
});
|
47
47
|
});
|
package/src/config/app.ts
CHANGED
@@ -23,6 +23,11 @@ if (typeof window === 'undefined' && isServerMode && !APP_URL) {
|
|
23
23
|
throw new Error('`APP_URL` is required in server mode');
|
24
24
|
}
|
25
25
|
|
26
|
+
const ASSISTANT_INDEX_URL =
|
27
|
+
'https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public';
|
28
|
+
|
29
|
+
const PLUGINS_INDEX_URL = 'https://chat-plugins.lobehub.com';
|
30
|
+
|
26
31
|
export const getAppConfig = () => {
|
27
32
|
const ACCESS_CODES = process.env.ACCESS_CODE?.split(',').filter(Boolean) || [];
|
28
33
|
|
@@ -60,14 +65,14 @@ export const getAppConfig = () => {
|
|
60
65
|
|
61
66
|
AGENTS_INDEX_URL: !!process.env.AGENTS_INDEX_URL
|
62
67
|
? process.env.AGENTS_INDEX_URL
|
63
|
-
:
|
68
|
+
: ASSISTANT_INDEX_URL,
|
64
69
|
|
65
70
|
DEFAULT_AGENT_CONFIG: process.env.DEFAULT_AGENT_CONFIG || '',
|
66
71
|
SYSTEM_AGENT: process.env.SYSTEM_AGENT,
|
67
72
|
|
68
73
|
PLUGINS_INDEX_URL: !!process.env.PLUGINS_INDEX_URL
|
69
74
|
? process.env.PLUGINS_INDEX_URL
|
70
|
-
:
|
75
|
+
: PLUGINS_INDEX_URL,
|
71
76
|
|
72
77
|
PLUGIN_SETTINGS: process.env.PLUGIN_SETTINGS,
|
73
78
|
|
@@ -3,7 +3,7 @@ import { describe, expect, it } from 'vitest';
|
|
3
3
|
|
4
4
|
import { AssistantStore } from './index';
|
5
5
|
|
6
|
-
const baseURL = 'https://
|
6
|
+
const baseURL = 'https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public';
|
7
7
|
describe('AssistantStore', () => {
|
8
8
|
it('should return the default index URL when no language is provided', () => {
|
9
9
|
const agentMarket = new AssistantStore();
|
@@ -14,19 +14,19 @@ describe('AssistantStore', () => {
|
|
14
14
|
it('should return the index URL for a not supported language', () => {
|
15
15
|
const agentMarket = new AssistantStore();
|
16
16
|
const url = agentMarket.getAgentIndexUrl('xxx' as any);
|
17
|
-
expect(url).toBe('https://
|
17
|
+
expect(url).toBe('https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public');
|
18
18
|
});
|
19
19
|
|
20
20
|
it('should return the zh-CN URL for zh locale', () => {
|
21
21
|
const agentMarket = new AssistantStore();
|
22
22
|
const url = agentMarket.getAgentIndexUrl('zh' as any);
|
23
|
-
expect(url).toBe('https://
|
23
|
+
expect(url).toBe('https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public/index.zh-CN.json');
|
24
24
|
});
|
25
25
|
|
26
26
|
it('should return the default URL for en locale', () => {
|
27
27
|
const agentMarket = new AssistantStore();
|
28
28
|
const url = agentMarket.getAgentIndexUrl('en' as any);
|
29
|
-
expect(url).toBe('https://
|
29
|
+
expect(url).toBe('https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public');
|
30
30
|
});
|
31
31
|
|
32
32
|
it('should return the base URL if the provided language is not supported', () => {
|