@lobehub/chat 1.136.2 → 1.136.3
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 +25 -0
- package/changelog/v1.json +9 -0
- package/package.json +2 -2
- package/packages/const/src/hotkeys.ts +12 -0
- package/packages/model-bank/src/aiModels/aihubmix.ts +11 -6
- package/packages/model-bank/src/aiModels/anthropic.ts +1 -0
- package/packages/model-bank/src/aiModels/azure.ts +1 -0
- package/packages/model-bank/src/aiModels/bedrock.ts +1 -0
- package/packages/model-bank/src/aiModels/deepseek.ts +1 -0
- package/packages/model-bank/src/aiModels/google.ts +1 -0
- package/packages/model-bank/src/aiModels/moonshot.ts +1 -0
- package/packages/model-bank/src/aiModels/openai.ts +18 -16
- package/packages/model-bank/src/aiModels/zhipu.ts +32 -30
- package/packages/model-bank/src/types/aiModel.ts +4 -0
- package/packages/model-runtime/src/types/chat.ts +12 -0
- package/packages/types/src/hotkey.ts +2 -0
- package/packages/web-crawler/src/crawImpl/__tests__/naive.test.ts +3 -3
- package/packages/web-crawler/src/crawImpl/naive.ts +2 -1
- package/src/app/[variants]/(main)/discover/(detail)/features/ShareButton.tsx +14 -11
- package/src/components/BrowserIcon/index.tsx +0 -2
- package/src/hooks/useHotkeys/chatScope.ts +34 -0
- package/src/hooks/useShare.tsx +0 -2
- package/src/locales/default/hotkey.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 1.136.3](https://github.com/lobehub/lobe-chat/compare/v1.136.2...v1.136.3)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2025-10-10**</sup>
|
|
8
|
+
|
|
9
|
+
#### 💄 Styles
|
|
10
|
+
|
|
11
|
+
- **misc**: Add delete & regenerate hotkeys.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Styles
|
|
19
|
+
|
|
20
|
+
- **misc**: Add delete & regenerate hotkeys, closes [#9538](https://github.com/lobehub/lobe-chat/issues/9538) ([d948580](https://github.com/lobehub/lobe-chat/commit/d948580))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
### [Version 1.136.2](https://github.com/lobehub/lobe-chat/compare/v1.136.1...v1.136.2)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2025-10-10**</sup>
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "1.136.
|
|
3
|
+
"version": "1.136.3",
|
|
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",
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"@formkit/auto-animate": "^0.9.0",
|
|
141
141
|
"@google/genai": "^1.19.0",
|
|
142
142
|
"@huggingface/inference": "^2.8.1",
|
|
143
|
-
"@icons-pack/react-simple-icons": "
|
|
143
|
+
"@icons-pack/react-simple-icons": "^13.8.0",
|
|
144
144
|
"@khmyznikov/pwa-install": "0.3.9",
|
|
145
145
|
"@langchain/community": "^0.3.55",
|
|
146
146
|
"@lobechat/agent-runtime": "workspace:*",
|
|
@@ -71,6 +71,18 @@ export const HOTKEYS_REGISTRATION: HotkeyRegistration = [
|
|
|
71
71
|
keys: combineKeys([KeyEnum.Alt, 'r']),
|
|
72
72
|
scopes: [HotkeyScopeEnum.Chat],
|
|
73
73
|
},
|
|
74
|
+
{
|
|
75
|
+
group: HotkeyGroupEnum.Conversation,
|
|
76
|
+
id: HotkeyEnum.DeleteLastMessage,
|
|
77
|
+
keys: combineKeys([KeyEnum.Alt, 'd']),
|
|
78
|
+
scopes: [HotkeyScopeEnum.Chat],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
group: HotkeyGroupEnum.Conversation,
|
|
82
|
+
id: HotkeyEnum.DeleteAndRegenerateMessage,
|
|
83
|
+
keys: combineKeys([KeyEnum.Alt, KeyEnum.Shift, 'r']),
|
|
84
|
+
scopes: [HotkeyScopeEnum.Chat],
|
|
85
|
+
},
|
|
74
86
|
{
|
|
75
87
|
group: HotkeyGroupEnum.Conversation,
|
|
76
88
|
id: HotkeyEnum.SaveTopic,
|
|
@@ -34,8 +34,7 @@ const aihubmixModels: AIChatModelCard[] = [
|
|
|
34
34
|
vision: true,
|
|
35
35
|
},
|
|
36
36
|
contextWindowTokens: 400_000,
|
|
37
|
-
description:
|
|
38
|
-
'GPT-5 Codex 是一个针对 Codex 或类似环境中的代理编码任务优化的 GPT-5 版本。',
|
|
37
|
+
description: 'GPT-5 Codex 是一个针对 Codex 或类似环境中的代理编码任务优化的 GPT-5 版本。',
|
|
39
38
|
displayName: 'GPT-5 Codex',
|
|
40
39
|
id: 'gpt-5-codex',
|
|
41
40
|
maxOutput: 128_000,
|
|
@@ -58,6 +57,7 @@ const aihubmixModels: AIChatModelCard[] = [
|
|
|
58
57
|
functionCall: true,
|
|
59
58
|
reasoning: true,
|
|
60
59
|
search: true,
|
|
60
|
+
structuredOutput: true,
|
|
61
61
|
vision: true,
|
|
62
62
|
},
|
|
63
63
|
contextWindowTokens: 400_000,
|
|
@@ -86,6 +86,7 @@ const aihubmixModels: AIChatModelCard[] = [
|
|
|
86
86
|
functionCall: true,
|
|
87
87
|
reasoning: true,
|
|
88
88
|
search: true,
|
|
89
|
+
structuredOutput: true,
|
|
89
90
|
vision: true,
|
|
90
91
|
},
|
|
91
92
|
contextWindowTokens: 400_000,
|
|
@@ -136,6 +137,7 @@ const aihubmixModels: AIChatModelCard[] = [
|
|
|
136
137
|
{
|
|
137
138
|
abilities: {
|
|
138
139
|
reasoning: true,
|
|
140
|
+
structuredOutput: false,
|
|
139
141
|
vision: true,
|
|
140
142
|
},
|
|
141
143
|
contextWindowTokens: 400_000,
|
|
@@ -382,8 +384,7 @@ const aihubmixModels: AIChatModelCard[] = [
|
|
|
382
384
|
vision: true,
|
|
383
385
|
},
|
|
384
386
|
contextWindowTokens: 2_000_000,
|
|
385
|
-
description:
|
|
386
|
-
'我们很高兴发布 Grok 4 Fast,这是我们在成本效益推理模型方面的最新进展。',
|
|
387
|
+
description: '我们很高兴发布 Grok 4 Fast,这是我们在成本效益推理模型方面的最新进展。',
|
|
387
388
|
displayName: 'Grok 4 Fast (Non-Reasoning)',
|
|
388
389
|
id: 'grok-4-fast-non-reasoning',
|
|
389
390
|
pricing: {
|
|
@@ -406,8 +407,7 @@ const aihubmixModels: AIChatModelCard[] = [
|
|
|
406
407
|
vision: true,
|
|
407
408
|
},
|
|
408
409
|
contextWindowTokens: 2_000_000,
|
|
409
|
-
description:
|
|
410
|
-
'我们很高兴发布 Grok 4 Fast,这是我们在成本效益推理模型方面的最新进展。',
|
|
410
|
+
description: '我们很高兴发布 Grok 4 Fast,这是我们在成本效益推理模型方面的最新进展。',
|
|
411
411
|
displayName: 'Grok 4 Fast',
|
|
412
412
|
id: 'grok-4-fast-reasoning',
|
|
413
413
|
pricing: {
|
|
@@ -489,6 +489,7 @@ const aihubmixModels: AIChatModelCard[] = [
|
|
|
489
489
|
functionCall: true,
|
|
490
490
|
reasoning: true,
|
|
491
491
|
search: true,
|
|
492
|
+
structuredOutput: true,
|
|
492
493
|
vision: true,
|
|
493
494
|
},
|
|
494
495
|
contextWindowTokens: 200_000,
|
|
@@ -523,6 +524,7 @@ const aihubmixModels: AIChatModelCard[] = [
|
|
|
523
524
|
functionCall: true,
|
|
524
525
|
reasoning: true,
|
|
525
526
|
search: true,
|
|
527
|
+
structuredOutput: true,
|
|
526
528
|
vision: true,
|
|
527
529
|
},
|
|
528
530
|
contextWindowTokens: 200_000,
|
|
@@ -556,6 +558,7 @@ const aihubmixModels: AIChatModelCard[] = [
|
|
|
556
558
|
functionCall: true,
|
|
557
559
|
reasoning: true,
|
|
558
560
|
search: true,
|
|
561
|
+
structuredOutput: true,
|
|
559
562
|
vision: true,
|
|
560
563
|
},
|
|
561
564
|
contextWindowTokens: 200_000,
|
|
@@ -848,6 +851,7 @@ const aihubmixModels: AIChatModelCard[] = [
|
|
|
848
851
|
functionCall: true,
|
|
849
852
|
reasoning: true,
|
|
850
853
|
search: true,
|
|
854
|
+
structuredOutput: true,
|
|
851
855
|
vision: true,
|
|
852
856
|
},
|
|
853
857
|
contextWindowTokens: 1_048_576 + 65_536,
|
|
@@ -876,6 +880,7 @@ const aihubmixModels: AIChatModelCard[] = [
|
|
|
876
880
|
functionCall: true,
|
|
877
881
|
reasoning: true,
|
|
878
882
|
search: true,
|
|
883
|
+
structuredOutput: true,
|
|
879
884
|
vision: true,
|
|
880
885
|
},
|
|
881
886
|
contextWindowTokens: 1_048_576 + 65_536,
|
|
@@ -74,6 +74,7 @@ export const openaiChatModels: AIChatModelCard[] = [
|
|
|
74
74
|
functionCall: true,
|
|
75
75
|
reasoning: true,
|
|
76
76
|
search: true,
|
|
77
|
+
structuredOutput: true,
|
|
77
78
|
vision: true,
|
|
78
79
|
},
|
|
79
80
|
contextWindowTokens: 400_000,
|
|
@@ -102,6 +103,7 @@ export const openaiChatModels: AIChatModelCard[] = [
|
|
|
102
103
|
functionCall: true,
|
|
103
104
|
reasoning: true,
|
|
104
105
|
search: true,
|
|
106
|
+
structuredOutput: true,
|
|
105
107
|
vision: true,
|
|
106
108
|
},
|
|
107
109
|
contextWindowTokens: 400_000,
|
|
@@ -1074,15 +1076,15 @@ export const openaiImageModels: AIImageModelCard[] = [
|
|
|
1074
1076
|
{
|
|
1075
1077
|
lookup: {
|
|
1076
1078
|
prices: {
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1079
|
+
high_1024x1024: 0.167,
|
|
1080
|
+
high_1024x1536: 0.25,
|
|
1081
|
+
high_1536x1024: 0.25,
|
|
1082
|
+
low_1024x1024: 0.011,
|
|
1083
|
+
low_1024x1536: 0.016,
|
|
1084
|
+
low_1536x1024: 0.016,
|
|
1085
|
+
medium_1024x1024: 0.042,
|
|
1086
|
+
medium_1024x1536: 0.063,
|
|
1087
|
+
medium_1536x1024: 0.063,
|
|
1086
1088
|
},
|
|
1087
1089
|
pricingParams: ['quality', 'size'],
|
|
1088
1090
|
},
|
|
@@ -1111,12 +1113,12 @@ export const openaiImageModels: AIImageModelCard[] = [
|
|
|
1111
1113
|
{
|
|
1112
1114
|
lookup: {
|
|
1113
1115
|
prices: {
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1116
|
+
low_1024x1024: 0.005,
|
|
1117
|
+
low_1024x1536: 0.006,
|
|
1118
|
+
low_1536x1024: 0.006,
|
|
1119
|
+
medium_1024x1024: 0.011,
|
|
1120
|
+
medium_1024x1536: 0.015,
|
|
1121
|
+
medium_1536x1024: 0.015,
|
|
1120
1122
|
},
|
|
1121
1123
|
pricingParams: ['quality', 'size'],
|
|
1122
1124
|
},
|
|
@@ -1126,8 +1128,8 @@ export const openaiImageModels: AIImageModelCard[] = [
|
|
|
1126
1128
|
},
|
|
1127
1129
|
],
|
|
1128
1130
|
},
|
|
1129
|
-
resolutions: ['1024x1024', '1024x1536', '1536x1024'],
|
|
1130
1131
|
releasedAt: '2025-10-06',
|
|
1132
|
+
resolutions: ['1024x1024', '1024x1536', '1536x1024'],
|
|
1131
1133
|
type: 'image',
|
|
1132
1134
|
},
|
|
1133
1135
|
{
|
|
@@ -16,7 +16,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
16
16
|
displayName: 'GLM-4.6',
|
|
17
17
|
enabled: true,
|
|
18
18
|
id: 'glm-4.6',
|
|
19
|
-
maxOutput:
|
|
19
|
+
maxOutput: 131_072,
|
|
20
20
|
pricing: {
|
|
21
21
|
currency: 'CNY',
|
|
22
22
|
units: [
|
|
@@ -80,7 +80,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
80
80
|
displayName: 'GLM-4.5V',
|
|
81
81
|
enabled: true,
|
|
82
82
|
id: 'glm-4.5v',
|
|
83
|
-
maxOutput:
|
|
83
|
+
maxOutput: 16_384,
|
|
84
84
|
pricing: {
|
|
85
85
|
currency: 'CNY',
|
|
86
86
|
units: [
|
|
@@ -134,12 +134,12 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
134
134
|
reasoning: true,
|
|
135
135
|
search: true,
|
|
136
136
|
},
|
|
137
|
-
contextWindowTokens:
|
|
137
|
+
contextWindowTokens: 131_072,
|
|
138
138
|
description:
|
|
139
139
|
'智谱旗舰模型,支持思考模式切换,综合能力达到开源模型的 SOTA 水平,上下文长度可达128K。',
|
|
140
140
|
displayName: 'GLM-4.5',
|
|
141
141
|
id: 'glm-4.5',
|
|
142
|
-
maxOutput:
|
|
142
|
+
maxOutput: 98_304,
|
|
143
143
|
pricing: {
|
|
144
144
|
currency: 'CNY',
|
|
145
145
|
units: [
|
|
@@ -196,11 +196,11 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
196
196
|
reasoning: true,
|
|
197
197
|
search: true,
|
|
198
198
|
},
|
|
199
|
-
contextWindowTokens:
|
|
199
|
+
contextWindowTokens: 131_072,
|
|
200
200
|
description: 'GLM-4.5 的极速版,在性能强劲的同时,生成速度可达 100 tokens/秒。',
|
|
201
201
|
displayName: 'GLM-4.5-X',
|
|
202
202
|
id: 'glm-4.5-x',
|
|
203
|
-
maxOutput:
|
|
203
|
+
maxOutput: 98_304,
|
|
204
204
|
pricing: {
|
|
205
205
|
currency: 'CNY',
|
|
206
206
|
units: [
|
|
@@ -257,11 +257,11 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
257
257
|
reasoning: true,
|
|
258
258
|
search: true,
|
|
259
259
|
},
|
|
260
|
-
contextWindowTokens:
|
|
260
|
+
contextWindowTokens: 131_072,
|
|
261
261
|
description: 'GLM-4.5 的轻量版,兼顾性能与性价比,可灵活切换混合思考模型。',
|
|
262
262
|
displayName: 'GLM-4.5-Air',
|
|
263
263
|
id: 'glm-4.5-air',
|
|
264
|
-
maxOutput:
|
|
264
|
+
maxOutput: 98_304,
|
|
265
265
|
pricing: {
|
|
266
266
|
currency: 'CNY',
|
|
267
267
|
units: [
|
|
@@ -316,11 +316,11 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
316
316
|
reasoning: true,
|
|
317
317
|
search: true,
|
|
318
318
|
},
|
|
319
|
-
contextWindowTokens:
|
|
319
|
+
contextWindowTokens: 131_072,
|
|
320
320
|
description: 'GLM-4.5-Air 的极速版,响应速度更快,专为大规模高速度需求打造。',
|
|
321
321
|
displayName: 'GLM-4.5-AirX',
|
|
322
322
|
id: 'glm-4.5-airx',
|
|
323
|
-
maxOutput:
|
|
323
|
+
maxOutput: 98_304,
|
|
324
324
|
pricing: {
|
|
325
325
|
currency: 'CNY',
|
|
326
326
|
units: [
|
|
@@ -375,12 +375,12 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
375
375
|
reasoning: true,
|
|
376
376
|
search: true,
|
|
377
377
|
},
|
|
378
|
-
contextWindowTokens:
|
|
378
|
+
contextWindowTokens: 131_072,
|
|
379
379
|
description: 'GLM-4.5 的免费版,推理、代码、智能体等任务表现出色。',
|
|
380
380
|
displayName: 'GLM-4.5-Flash',
|
|
381
381
|
enabled: true,
|
|
382
382
|
id: 'glm-4.5-flash',
|
|
383
|
-
maxOutput:
|
|
383
|
+
maxOutput: 98_304,
|
|
384
384
|
pricing: {
|
|
385
385
|
currency: 'CNY',
|
|
386
386
|
units: [
|
|
@@ -405,7 +405,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
405
405
|
'GLM-4.1V-Thinking 系列模型是目前已知10B级别的VLM模型中性能最强的视觉模型,融合了同级别SOTA的各项视觉语言任务,包括视频理解、图片问答、学科解题、OCR文字识别、文档和图表解读、GUI Agent、前端网页Coding、Grounding等,多项任务能力甚至超过8倍参数量的Qwen2.5-VL-72B。通过领先的强化学习技术,模型掌握了通过思维链推理的方式提升回答的准确性和丰富度,从最终效果和可解释性等维度都显著超过传统的非thinking模型。',
|
|
406
406
|
displayName: 'GLM-4.1V-Thinking-FlashX',
|
|
407
407
|
id: 'glm-4.1v-thinking-flashx',
|
|
408
|
-
maxOutput:
|
|
408
|
+
maxOutput: 32_768,
|
|
409
409
|
pricing: {
|
|
410
410
|
currency: 'CNY',
|
|
411
411
|
units: [
|
|
@@ -425,7 +425,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
425
425
|
'GLM-4.1V-Thinking 系列模型是目前已知10B级别的VLM模型中性能最强的视觉模型,融合了同级别SOTA的各项视觉语言任务,包括视频理解、图片问答、学科解题、OCR文字识别、文档和图表解读、GUI Agent、前端网页Coding、Grounding等,多项任务能力甚至超过8倍参数量的Qwen2.5-VL-72B。通过领先的强化学习技术,模型掌握了通过思维链推理的方式提升回答的准确性和丰富度,从最终效果和可解释性等维度都显著超过传统的非thinking模型。',
|
|
426
426
|
displayName: 'GLM-4.1V-Thinking-Flash',
|
|
427
427
|
id: 'glm-4.1v-thinking-flash',
|
|
428
|
-
maxOutput:
|
|
428
|
+
maxOutput: 32_768,
|
|
429
429
|
pricing: {
|
|
430
430
|
currency: 'CNY',
|
|
431
431
|
units: [
|
|
@@ -457,7 +457,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
457
457
|
reasoning: true,
|
|
458
458
|
search: true,
|
|
459
459
|
},
|
|
460
|
-
contextWindowTokens:
|
|
460
|
+
contextWindowTokens: 131_072,
|
|
461
461
|
description: '推理模型: 具备强大推理能力,适用于需要深度推理的任务。',
|
|
462
462
|
displayName: 'GLM-Z1-Air',
|
|
463
463
|
id: 'glm-z1-air',
|
|
@@ -483,7 +483,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
483
483
|
description: '极速推理:具有超快的推理速度和强大的推理效果。',
|
|
484
484
|
displayName: 'GLM-Z1-AirX',
|
|
485
485
|
id: 'glm-z1-airx',
|
|
486
|
-
maxOutput:
|
|
486
|
+
maxOutput: 32_768,
|
|
487
487
|
pricing: {
|
|
488
488
|
currency: 'CNY',
|
|
489
489
|
units: [
|
|
@@ -501,7 +501,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
501
501
|
reasoning: true,
|
|
502
502
|
search: true,
|
|
503
503
|
},
|
|
504
|
-
contextWindowTokens:
|
|
504
|
+
contextWindowTokens: 131_072,
|
|
505
505
|
description: '高速低价:Flash增强版本,超快推理速度,更快并发保障。',
|
|
506
506
|
displayName: 'GLM-Z1-FlashX',
|
|
507
507
|
id: 'glm-z1-flashx',
|
|
@@ -523,7 +523,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
523
523
|
reasoning: true,
|
|
524
524
|
search: true,
|
|
525
525
|
},
|
|
526
|
-
contextWindowTokens:
|
|
526
|
+
contextWindowTokens: 131_072,
|
|
527
527
|
description: 'GLM-Z1 系列具备强大的复杂推理能力,在逻辑推理、数学、编程等领域表现优异。',
|
|
528
528
|
displayName: 'GLM-Z1-Flash',
|
|
529
529
|
id: 'glm-z1-flash',
|
|
@@ -545,11 +545,11 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
545
545
|
functionCall: true,
|
|
546
546
|
search: true,
|
|
547
547
|
},
|
|
548
|
-
contextWindowTokens:
|
|
548
|
+
contextWindowTokens: 131_072,
|
|
549
549
|
description: 'GLM-4-Flash 是处理简单任务的理想选择,速度最快且免费。',
|
|
550
550
|
displayName: 'GLM-4-Flash-250414',
|
|
551
551
|
id: 'glm-4-flash-250414',
|
|
552
|
-
maxOutput:
|
|
552
|
+
maxOutput: 32_768,
|
|
553
553
|
pricing: {
|
|
554
554
|
currency: 'CNY',
|
|
555
555
|
units: [
|
|
@@ -567,11 +567,11 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
567
567
|
functionCall: true,
|
|
568
568
|
search: true,
|
|
569
569
|
},
|
|
570
|
-
contextWindowTokens:
|
|
570
|
+
contextWindowTokens: 131_072,
|
|
571
571
|
description: 'GLM-4-FlashX 是Flash的增强版本,超快推理速度。',
|
|
572
572
|
displayName: 'GLM-4-FlashX-250414',
|
|
573
573
|
id: 'glm-4-flashx',
|
|
574
|
-
maxOutput:
|
|
574
|
+
maxOutput: 4095,
|
|
575
575
|
pricing: {
|
|
576
576
|
currency: 'CNY',
|
|
577
577
|
units: [
|
|
@@ -593,7 +593,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
593
593
|
description: 'GLM-4-Long 支持超长文本输入,适合记忆型任务与大规模文档处理。',
|
|
594
594
|
displayName: 'GLM-4-Long',
|
|
595
595
|
id: 'glm-4-long',
|
|
596
|
-
maxOutput:
|
|
596
|
+
maxOutput: 4095,
|
|
597
597
|
pricing: {
|
|
598
598
|
currency: 'CNY',
|
|
599
599
|
units: [
|
|
@@ -611,11 +611,11 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
611
611
|
functionCall: true,
|
|
612
612
|
search: true,
|
|
613
613
|
},
|
|
614
|
-
contextWindowTokens:
|
|
614
|
+
contextWindowTokens: 131_072,
|
|
615
615
|
description: 'GLM-4-Air 是性价比高的版本,性能接近GLM-4,提供快速度和实惠的价格。',
|
|
616
616
|
displayName: 'GLM-4-Air-250414',
|
|
617
617
|
id: 'glm-4-air-250414',
|
|
618
|
-
maxOutput:
|
|
618
|
+
maxOutput: 16_384,
|
|
619
619
|
pricing: {
|
|
620
620
|
currency: 'CNY',
|
|
621
621
|
units: [
|
|
@@ -637,7 +637,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
637
637
|
description: 'GLM-4-AirX 提供 GLM-4-Air 的高效版本,推理速度可达其2.6倍。',
|
|
638
638
|
displayName: 'GLM-4-AirX',
|
|
639
639
|
id: 'glm-4-airx',
|
|
640
|
-
maxOutput:
|
|
640
|
+
maxOutput: 4095,
|
|
641
641
|
pricing: {
|
|
642
642
|
currency: 'CNY',
|
|
643
643
|
units: [
|
|
@@ -655,11 +655,11 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
655
655
|
functionCall: true,
|
|
656
656
|
search: true,
|
|
657
657
|
},
|
|
658
|
-
contextWindowTokens:
|
|
658
|
+
contextWindowTokens: 131_072,
|
|
659
659
|
description: 'GLM-4-Plus 作为高智能旗舰,具备强大的处理长文本和复杂任务的能力,性能全面提升。',
|
|
660
660
|
displayName: 'GLM-4-Plus',
|
|
661
661
|
id: 'glm-4-plus',
|
|
662
|
-
maxOutput:
|
|
662
|
+
maxOutput: 4095,
|
|
663
663
|
pricing: {
|
|
664
664
|
currency: 'CNY',
|
|
665
665
|
units: [
|
|
@@ -677,7 +677,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
677
677
|
functionCall: true,
|
|
678
678
|
search: true,
|
|
679
679
|
},
|
|
680
|
-
contextWindowTokens:
|
|
680
|
+
contextWindowTokens: 131_072,
|
|
681
681
|
description: 'GLM-4-0520 是最新模型版本,专为高度复杂和多样化任务设计,表现卓越。',
|
|
682
682
|
displayName: 'GLM-4-0520',
|
|
683
683
|
id: 'glm-4-0520', // 弃用时间 2025年12月30日
|
|
@@ -702,6 +702,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
702
702
|
'GLM-4V-Flash 专注于高效的单一图像理解,适用于快速图像解析的场景,例如实时图像分析或批量图像处理。',
|
|
703
703
|
displayName: 'GLM-4V-Flash',
|
|
704
704
|
id: 'glm-4v-flash',
|
|
705
|
+
maxOutput: 8192,
|
|
705
706
|
pricing: {
|
|
706
707
|
currency: 'CNY',
|
|
707
708
|
units: [
|
|
@@ -737,6 +738,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
737
738
|
description: 'GLM-4V 提供强大的图像理解与推理能力,支持多种视觉任务。',
|
|
738
739
|
displayName: 'GLM-4V',
|
|
739
740
|
id: 'glm-4v',
|
|
741
|
+
maxOutput: 1024,
|
|
740
742
|
pricing: {
|
|
741
743
|
currency: 'CNY',
|
|
742
744
|
units: [
|
|
@@ -747,7 +749,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
|
747
749
|
type: 'chat',
|
|
748
750
|
},
|
|
749
751
|
{
|
|
750
|
-
contextWindowTokens:
|
|
752
|
+
contextWindowTokens: 131_072,
|
|
751
753
|
description:
|
|
752
754
|
'CodeGeeX-4 是强大的AI编程助手,支持多种编程语言的智能问答与代码补全,提升开发效率。',
|
|
753
755
|
displayName: 'CodeGeeX-4',
|
|
@@ -4,6 +4,17 @@ import { MessageToolCall, MessageToolCallChunk } from './toolsCalling';
|
|
|
4
4
|
|
|
5
5
|
export type LLMRoleType = 'user' | 'system' | 'assistant' | 'function' | 'tool';
|
|
6
6
|
|
|
7
|
+
export type ChatResponseFormat =
|
|
8
|
+
| { type: 'json_object' }
|
|
9
|
+
| {
|
|
10
|
+
json_schema: {
|
|
11
|
+
name: string;
|
|
12
|
+
schema: Record<string, any>;
|
|
13
|
+
strict?: boolean;
|
|
14
|
+
};
|
|
15
|
+
type: 'json_schema';
|
|
16
|
+
};
|
|
17
|
+
|
|
7
18
|
interface UserMessageContentPartThinking {
|
|
8
19
|
signature: string;
|
|
9
20
|
thinking: string;
|
|
@@ -87,6 +98,7 @@ export interface ChatStreamPayload {
|
|
|
87
98
|
};
|
|
88
99
|
reasoning_effort?: 'minimal' | 'low' | 'medium' | 'high';
|
|
89
100
|
responseMode?: 'stream' | 'json';
|
|
101
|
+
response_format?: ChatResponseFormat;
|
|
90
102
|
/**
|
|
91
103
|
* @title 是否开启流式请求
|
|
92
104
|
* @default true
|
|
@@ -60,6 +60,8 @@ export const KeyEnum = {
|
|
|
60
60
|
export const HotkeyEnum = {
|
|
61
61
|
AddUserMessage: 'addUserMessage',
|
|
62
62
|
ClearCurrentMessages: 'clearCurrentMessages',
|
|
63
|
+
DeleteAndRegenerateMessage: 'deleteAndRegenerateMessage',
|
|
64
|
+
DeleteLastMessage: 'deleteLastMessage',
|
|
63
65
|
EditMessage: 'editMessage',
|
|
64
66
|
NavigateToChat: 'navigateToChat',
|
|
65
67
|
OpenChatSettings: 'openChatSettings',
|
|
@@ -13,9 +13,9 @@ vi.mock('../../utils/withTimeout', () => ({
|
|
|
13
13
|
withTimeout: vi.fn(),
|
|
14
14
|
}));
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
vi.mock('ssrf-safe-fetch', () => ({
|
|
17
|
+
ssrfSafeFetch: vi.fn(),
|
|
18
|
+
}));
|
|
19
19
|
|
|
20
20
|
describe('naive crawler', () => {
|
|
21
21
|
beforeEach(() => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { CrawlImpl, CrawlSuccessResult } from '../type';
|
|
2
1
|
import { ssrfSafeFetch } from 'ssrf-safe-fetch';
|
|
2
|
+
|
|
3
|
+
import { CrawlImpl, CrawlSuccessResult } from '../type';
|
|
3
4
|
import { NetworkConnectionError, PageNotFoundError, TimeoutError } from '../utils/errorType';
|
|
4
5
|
import { htmlToMarkdown } from '../utils/htmlToMarkdown';
|
|
5
6
|
import { DEFAULT_TIMEOUT, withTimeout } from '../utils/withTimeout';
|
|
@@ -70,7 +70,7 @@ interface ShareButtonProps extends ButtonProps {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
const ShareButton = memo<ShareButtonProps>(({ meta, ...rest }) => {
|
|
73
|
-
const { x, reddit, telegram, whatsapp, mastodon,
|
|
73
|
+
const { x, reddit, telegram, whatsapp, mastodon, weibo } = useShare({
|
|
74
74
|
avatar: '',
|
|
75
75
|
desc: '',
|
|
76
76
|
hashtags: [],
|
|
@@ -118,16 +118,19 @@ const ShareButton = memo<ShareButtonProps>(({ meta, ...rest }) => {
|
|
|
118
118
|
</Center>
|
|
119
119
|
</Flexbox>
|
|
120
120
|
<Flexbox align={'center'} gap={8} horizontal justify={'center'} wrap={'wrap'}>
|
|
121
|
-
{[x, reddit, telegram, whatsapp, mastodon,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
121
|
+
{[x, reddit, telegram, whatsapp, mastodon, weibo].map(
|
|
122
|
+
(item) =>
|
|
123
|
+
item.icon && (
|
|
124
|
+
<Link href={item.link} key={item.title} target={'_blank'}>
|
|
125
|
+
<ActionIcon
|
|
126
|
+
className={styles.icon}
|
|
127
|
+
icon={item.icon}
|
|
128
|
+
size={{ blockSize: 36, borderRadius: 18, size: 16 }}
|
|
129
|
+
title={item.title}
|
|
130
|
+
/>
|
|
131
|
+
</Link>
|
|
132
|
+
),
|
|
133
|
+
)}
|
|
131
134
|
</Flexbox>
|
|
132
135
|
<Flexbox align={'center'} gap={8} horizontal width={'100%'}>
|
|
133
136
|
<Input value={meta.url} variant={'filled'} />
|
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
SiBrave,
|
|
3
3
|
SiFirefox,
|
|
4
4
|
SiGooglechrome,
|
|
5
|
-
SiMicrosoftedge,
|
|
6
5
|
SiOpera,
|
|
7
6
|
SiSafari,
|
|
8
7
|
SiSamsung,
|
|
@@ -13,7 +12,6 @@ const lastVersion = {
|
|
|
13
12
|
'Brave': SiBrave,
|
|
14
13
|
'Chrome': SiGooglechrome,
|
|
15
14
|
'Chromium': SiGooglechrome,
|
|
16
|
-
'Edge': SiMicrosoftedge,
|
|
17
15
|
'Firefox': SiFirefox,
|
|
18
16
|
'Mobile Safari': SiSafari,
|
|
19
17
|
'Opera': SiOpera,
|
|
@@ -47,6 +47,38 @@ export const useRegenerateMessageHotkey = () => {
|
|
|
47
47
|
);
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
+
export const useDeleteAndRegenerateMessageHotkey = () => {
|
|
51
|
+
const delAndRegenerateMessage = useChatStore((s) => s.delAndRegenerateMessage);
|
|
52
|
+
const lastMessage = useChatStore(chatSelectors.latestMessage, isEqual);
|
|
53
|
+
|
|
54
|
+
const disable = !lastMessage || lastMessage.id === 'default' || lastMessage.role === 'system';
|
|
55
|
+
|
|
56
|
+
return useHotkeyById(
|
|
57
|
+
HotkeyEnum.DeleteAndRegenerateMessage,
|
|
58
|
+
() => !disable && delAndRegenerateMessage(lastMessage.id),
|
|
59
|
+
{
|
|
60
|
+
enableOnContentEditable: true,
|
|
61
|
+
enabled: !disable,
|
|
62
|
+
},
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const useDeleteLastMessageHotkey = () => {
|
|
67
|
+
const deleteMessage = useChatStore((s) => s.deleteMessage);
|
|
68
|
+
const lastMessage = useChatStore(chatSelectors.latestMessage, isEqual);
|
|
69
|
+
|
|
70
|
+
const disable = !lastMessage || lastMessage.id === 'default' || lastMessage.role === 'system';
|
|
71
|
+
|
|
72
|
+
return useHotkeyById(
|
|
73
|
+
HotkeyEnum.DeleteLastMessage,
|
|
74
|
+
() => !disable && deleteMessage(lastMessage.id),
|
|
75
|
+
{
|
|
76
|
+
enableOnContentEditable: true,
|
|
77
|
+
enabled: !disable,
|
|
78
|
+
},
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
|
|
50
82
|
export const useToggleLeftPanelHotkey = () => {
|
|
51
83
|
const isZenMode = useGlobalStore((s) => s.status.zenMode);
|
|
52
84
|
const [isPinned] = usePinnedAgentState();
|
|
@@ -112,6 +144,8 @@ export const useRegisterChatHotkeys = () => {
|
|
|
112
144
|
|
|
113
145
|
// Conversation
|
|
114
146
|
useRegenerateMessageHotkey();
|
|
147
|
+
useDeleteAndRegenerateMessageHotkey();
|
|
148
|
+
useDeleteLastMessageHotkey();
|
|
115
149
|
useSaveTopicHotkey();
|
|
116
150
|
useAddUserMessageHotkey();
|
|
117
151
|
useClearCurrentMessagesHotkey();
|
package/src/hooks/useShare.tsx
CHANGED
|
@@ -11,6 +11,14 @@ const hotkey: HotkeyI18nTranslations & {
|
|
|
11
11
|
desc: '清空当前会话的消息和上传的文件',
|
|
12
12
|
title: '清空会话消息',
|
|
13
13
|
},
|
|
14
|
+
deleteAndRegenerateMessage: {
|
|
15
|
+
desc: '删除最后一条消息并重新生成',
|
|
16
|
+
title: '删除并重新生成',
|
|
17
|
+
},
|
|
18
|
+
deleteLastMessage: {
|
|
19
|
+
desc: '删除最后一条消息',
|
|
20
|
+
title: '删除最后一条消息',
|
|
21
|
+
},
|
|
14
22
|
desktop: {
|
|
15
23
|
openSettings: {
|
|
16
24
|
desc: '打开应用设置页面',
|