@lobehub/chat 1.97.13 → 1.97.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,39 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.97.14](https://github.com/lobehub/lobe-chat/compare/v1.97.13...v1.97.14)
6
+
7
+ <sup>Released on **2025-07-12**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Revert "💄 style: Open new topic by tap Just Chat again".
12
+
13
+ #### 💄 Styles
14
+
15
+ - **misc**: Add Kimi K2 model.
16
+
17
+ <br/>
18
+
19
+ <details>
20
+ <summary><kbd>Improvements and Fixes</kbd></summary>
21
+
22
+ #### What's fixed
23
+
24
+ - **misc**: Revert "💄 style: Open new topic by tap Just Chat again", closes [#8402](https://github.com/lobehub/lobe-chat/issues/8402) ([55462b9](https://github.com/lobehub/lobe-chat/commit/55462b9))
25
+
26
+ #### Styles
27
+
28
+ - **misc**: Add Kimi K2 model, closes [#8401](https://github.com/lobehub/lobe-chat/issues/8401) ([4cb1a18](https://github.com/lobehub/lobe-chat/commit/4cb1a18))
29
+
30
+ </details>
31
+
32
+ <div align="right">
33
+
34
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
35
+
36
+ </div>
37
+
5
38
  ### [Version 1.97.13](https://github.com/lobehub/lobe-chat/compare/v1.97.12...v1.97.13)
6
39
 
7
40
  <sup>Released on **2025-07-12**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,16 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Revert \"💄 style: Open new topic by tap Just Chat again\"."
6
+ ],
7
+ "improvements": [
8
+ "Add Kimi K2 model."
9
+ ]
10
+ },
11
+ "date": "2025-07-12",
12
+ "version": "1.97.14"
13
+ },
2
14
  {
3
15
  "children": {
4
16
  "improvements": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.97.13",
3
+ "version": "1.97.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",
@@ -311,7 +311,7 @@
311
311
  "@types/unist": "^3.0.3",
312
312
  "@types/uuid": "^10.0.0",
313
313
  "@types/ws": "^8.18.1",
314
- "@typescript/native-preview": "latest",
314
+ "@typescript/native-preview": "7.0.0-dev.20250711.1",
315
315
  "@vitest/coverage-v8": "^3.1.4",
316
316
  "ajv-keywords": "^5.1.0",
317
317
  "commitlint": "^19.8.1",
@@ -6,8 +6,6 @@ import { DEFAULT_INBOX_AVATAR } from '@/const/meta';
6
6
  import { INBOX_SESSION_ID } from '@/const/session';
7
7
  import { SESSION_CHAT_URL } from '@/const/url';
8
8
  import { useSwitchSession } from '@/hooks/useSwitchSession';
9
- import { getChatStoreState, useChatStore } from '@/store/chat';
10
- import { chatSelectors } from '@/store/chat/selectors';
11
9
  import { useServerConfigStore } from '@/store/serverConfig';
12
10
  import { useSessionStore } from '@/store/session';
13
11
 
@@ -19,24 +17,13 @@ const Inbox = memo(() => {
19
17
  const activeId = useSessionStore((s) => s.activeId);
20
18
  const switchSession = useSwitchSession();
21
19
 
22
- const openNewTopicOrSaveTopic = useChatStore((s) => s.openNewTopicOrSaveTopic);
23
-
24
20
  return (
25
21
  <Link
26
22
  aria-label={t('inbox.title')}
27
23
  href={SESSION_CHAT_URL(INBOX_SESSION_ID, mobile)}
28
- onClick={async (e) => {
24
+ onClick={(e) => {
29
25
  e.preventDefault();
30
- if (activeId === INBOX_SESSION_ID) {
31
- // If user tap the inbox again, open a new topic
32
- const inboxMessages = chatSelectors.inboxActiveTopicMessages(getChatStoreState());
33
-
34
- if (inboxMessages.length > 0) {
35
- await openNewTopicOrSaveTopic();
36
- }
37
- } else {
38
- switchSession(INBOX_SESSION_ID);
39
- }
26
+ switchSession(INBOX_SESSION_ID);
40
27
  }}
41
28
  >
42
29
  <ListItem
@@ -2,6 +2,29 @@ import { AIChatModelCard } from '@/types/aiModel';
2
2
 
3
3
  // https://platform.moonshot.cn/docs/pricing/chat
4
4
  const moonshotChatModels: AIChatModelCard[] = [
5
+ {
6
+ abilities: {
7
+ functionCall: true,
8
+ search: true,
9
+ },
10
+ contextWindowTokens: 131_072,
11
+ description:
12
+ 'kimi-k2 是一款具备超强代码和 Agent 能力的 MoE 架构基础模型,总参数 1T,激活参数 32B。在通用知识推理、编程、数学、Agent 等主要类别的基准性能测试中,K2 模型的性能超过其他主流开源模型。',
13
+ displayName: 'Kimi K2',
14
+ enabled: true,
15
+ id: 'kimi-k2-0711-preview',
16
+ pricing: {
17
+ cachedInput: 1,
18
+ currency: 'CNY',
19
+ input: 4,
20
+ output: 16,
21
+ },
22
+ releasedAt: '2025-07-11',
23
+ settings: {
24
+ searchImpl: 'params',
25
+ },
26
+ type: 'chat',
27
+ },
5
28
  {
6
29
  abilities: {
7
30
  functionCall: true,
@@ -17,7 +40,7 @@ const moonshotChatModels: AIChatModelCard[] = [
17
40
  pricing: {
18
41
  cachedInput: 1,
19
42
  currency: 'CNY',
20
- input: 10,
43
+ input: 10, // 128k 上下文时
21
44
  output: 30,
22
45
  },
23
46
  releasedAt: '2025-02-17',
@@ -56,7 +79,7 @@ const moonshotChatModels: AIChatModelCard[] = [
56
79
  id: 'moonshot-v1-auto',
57
80
  pricing: {
58
81
  currency: 'CNY',
59
- input: 10,
82
+ input: 10, // 128k 上下文时
60
83
  output: 30,
61
84
  },
62
85
  settings: {
@@ -201,11 +201,6 @@ const isSendButtonDisabledByMessage = (s: ChatStoreState) =>
201
201
  // 4. when the message is in RAG flow
202
202
  isInRAGFlow(s);
203
203
 
204
- const inboxActiveTopicMessages = (state: ChatStoreState) => {
205
- const activeTopicId = state.activeTopicId;
206
- return state.messagesMap[messageMapKey(INBOX_SESSION_ID, activeTopicId)] || [];
207
- };
208
-
209
204
  export const chatSelectors = {
210
205
  activeBaseChats,
211
206
  activeBaseChatsWithoutTool,
@@ -218,7 +213,6 @@ export const chatSelectors = {
218
213
  getMessageById,
219
214
  getMessageByToolCallId,
220
215
  getTraceIdByMessageId,
221
- inboxActiveTopicMessages,
222
216
  isAIGenerating,
223
217
  isCreatingMessage,
224
218
  isCurrentChatLoaded,