@lobehub/chat 1.105.4 → 1.105.6

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,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.105.6](https://github.com/lobehub/lobe-chat/compare/v1.105.5...v1.105.6)
6
+
7
+ <sup>Released on **2025-07-29**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Open new topic by tap Just Chat again.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Open new topic by tap Just Chat again, closes [#8426](https://github.com/lobehub/lobe-chat/issues/8426) ([018ca75](https://github.com/lobehub/lobe-chat/commit/018ca75))
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
+
30
+ ### [Version 1.105.5](https://github.com/lobehub/lobe-chat/compare/v1.105.4...v1.105.5)
31
+
32
+ <sup>Released on **2025-07-29**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Reorder AppTheme and Locale to fix modal i18n.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Reorder AppTheme and Locale to fix modal i18n, closes [#8600](https://github.com/lobehub/lobe-chat/issues/8600) ([3264cf2](https://github.com/lobehub/lobe-chat/commit/3264cf2))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 1.105.4](https://github.com/lobehub/lobe-chat/compare/v1.105.3...v1.105.4)
6
56
 
7
57
  <sup>Released on **2025-07-29**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Open new topic by tap Just Chat again."
6
+ ]
7
+ },
8
+ "date": "2025-07-29",
9
+ "version": "1.105.6"
10
+ },
11
+ {
12
+ "children": {
13
+ "fixes": [
14
+ "Reorder AppTheme and Locale to fix modal i18n."
15
+ ]
16
+ },
17
+ "date": "2025-07-29",
18
+ "version": "1.105.5"
19
+ },
2
20
  {
3
21
  "children": {
4
22
  "fixes": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.105.4",
3
+ "version": "1.105.6",
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",
@@ -6,6 +6,8 @@ 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';
9
11
  import { useServerConfigStore } from '@/store/serverConfig';
10
12
  import { useSessionStore } from '@/store/session';
11
13
 
@@ -17,13 +19,26 @@ const Inbox = memo(() => {
17
19
  const activeId = useSessionStore((s) => s.activeId);
18
20
  const switchSession = useSwitchSession();
19
21
 
22
+ const openNewTopicOrSaveTopic = useChatStore((s) => s.openNewTopicOrSaveTopic);
23
+
20
24
  return (
21
25
  <Link
22
26
  aria-label={t('inbox.title')}
23
27
  href={SESSION_CHAT_URL(INBOX_SESSION_ID, mobile)}
24
- onClick={(e) => {
28
+ onClick={async (e) => {
25
29
  e.preventDefault();
26
- switchSession(INBOX_SESSION_ID);
30
+
31
+ if (activeId === INBOX_SESSION_ID && !mobile) {
32
+ // If user tap the inbox again, open a new topic.
33
+ // Only for desktop.
34
+ const inboxMessages = chatSelectors.inboxActiveTopicMessages(getChatStoreState());
35
+
36
+ if (inboxMessages.length > 0) {
37
+ await openNewTopicOrSaveTopic();
38
+ }
39
+ } else {
40
+ switchSession(INBOX_SESSION_ID);
41
+ }
27
42
  }}
28
43
  >
29
44
  <ListItem
@@ -40,15 +40,15 @@ const GlobalLayout = async ({
40
40
  const serverConfig = await getServerGlobalConfig();
41
41
  return (
42
42
  <StyleRegistry>
43
- <AppTheme
44
- customFontFamily={appEnv.CUSTOM_FONT_FAMILY}
45
- customFontURL={appEnv.CUSTOM_FONT_URL}
46
- defaultAppearance={appearance}
47
- defaultNeutralColor={neutralColor as any}
48
- defaultPrimaryColor={primaryColor as any}
49
- globalCDN={appEnv.CDN_USE_GLOBAL}
50
- >
51
- <Locale antdLocale={antdLocale} defaultLang={userLocale}>
43
+ <Locale antdLocale={antdLocale} defaultLang={userLocale}>
44
+ <AppTheme
45
+ customFontFamily={appEnv.CUSTOM_FONT_FAMILY}
46
+ customFontURL={appEnv.CUSTOM_FONT_URL}
47
+ defaultAppearance={appearance}
48
+ defaultNeutralColor={neutralColor as any}
49
+ defaultPrimaryColor={primaryColor as any}
50
+ globalCDN={appEnv.CDN_USE_GLOBAL}
51
+ >
52
52
  <ServerConfigStoreProvider
53
53
  featureFlags={serverFeatureFlags}
54
54
  isMobile={isMobile}
@@ -63,8 +63,8 @@ const GlobalLayout = async ({
63
63
  {process.env.NODE_ENV === 'development' && <DevPanel />}
64
64
  </Suspense>
65
65
  </ServerConfigStoreProvider>
66
- </Locale>
67
- </AppTheme>
66
+ </AppTheme>
67
+ </Locale>
68
68
  <AntdV5MonkeyPatch />
69
69
  </StyleRegistry>
70
70
  );
@@ -201,6 +201,11 @@ 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
+
204
209
  export const chatSelectors = {
205
210
  activeBaseChats,
206
211
  activeBaseChatsWithoutTool,
@@ -213,6 +218,7 @@ export const chatSelectors = {
213
218
  getMessageById,
214
219
  getMessageByToolCallId,
215
220
  getTraceIdByMessageId,
221
+ inboxActiveTopicMessages,
216
222
  isAIGenerating,
217
223
  isCreatingMessage,
218
224
  isCurrentChatLoaded,