@lobehub/chat 1.26.1 → 1.26.2

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.26.2](https://github.com/lobehub/lobe-chat/compare/v1.26.1...v1.26.2)
6
+
7
+ <sup>Released on **2024-10-28**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix page not switch when clicking on the pin assistant.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix page not switch when clicking on the pin assistant, closes [#4521](https://github.com/lobehub/lobe-chat/issues/4521) ([30b424a](https://github.com/lobehub/lobe-chat/commit/30b424a))
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
+
5
30
  ### [Version 1.26.1](https://github.com/lobehub/lobe-chat/compare/v1.26.0...v1.26.1)
6
31
 
7
32
  <sup>Released on **2024-10-27**</sup>
package/README.md CHANGED
@@ -285,14 +285,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
285
285
 
286
286
  <!-- AGENT LIST -->
287
287
 
288
- | Recent Submits | Description |
289
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
290
- | [Algorithm Answer Mentor](https://chat-preview.lobehub.com/market?agent=leetcode-tutor)<br/><sup>By **[Stark-X](https://github.com/Stark-X)** on **2024-10-21**</sup> | Specializes in LeetCode algorithm solutions and user guidance<br/>`algorithm` `problem-solving` `programming` `education` |
291
- | [Psychologist](https://chat-preview.lobehub.com/market?agent=psychological-counselor)<br/><sup>By **[JIANGTUNAN](https://github.com/JIANGTUNAN)** on **2024-10-21**</sup> | An experienced psychologist, warmly and patiently listening to your story.<br/>`psychological-counseling` `consultation` `sharing` `friendly` `doctor` `counselor` |
292
- | [Boxing Training Master](https://chat-preview.lobehub.com/market?agent=boxing-master)<br/><sup>By **[Luyi-2333](https://github.com/Luyi-2333)** on **2024-10-15**</sup> | Expert in boxing training guidance and personalized plan development<br/>`boxing-training` `personalized-plans` `fitness-guidance` `progress-evaluation` `technique-improvement` `health-and-nutrition` |
293
- | [Coconut](https://chat-preview.lobehub.com/market?agent=deep-thinker-ai)<br/><sup>By **[hia1234](https://github.com/hia1234)** on **2024-10-15**</sup> | A chatbot that undergoes several reviews of its responses, checking whether there is a basis for its statements and actively requesting feedback while engaging in repeated interactions.<br/>`programming` `general` |
294
-
295
- > 📊 Total agents: [<kbd>**420**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
288
+ | Recent Submits | Description |
289
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
290
+ | [Vector Logo Generator](https://chat-preview.lobehub.com/market?agent=svg-logo)<br/><sup>By **[Justin3go](https://github.com/Justin3go)** on **2024-10-27**</sup> | Specializing in UI/UX design and logo creation<br/>`ui-ux-design` `logo-design` `user-needs` `interaction-design` `tool-usage` |
291
+ | [Algorithm Answer Mentor](https://chat-preview.lobehub.com/market?agent=leetcode-tutor)<br/><sup>By **[Stark-X](https://github.com/Stark-X)** on **2024-10-21**</sup> | Specializes in LeetCode algorithm solutions and user guidance<br/>`algorithm` `problem-solving` `programming` `education` |
292
+ | [Psychologist](https://chat-preview.lobehub.com/market?agent=psychological-counselor)<br/><sup>By **[JIANGTUNAN](https://github.com/JIANGTUNAN)** on **2024-10-21**</sup> | An experienced psychologist, warmly and patiently listening to your story.<br/>`psychological-counseling` `consultation` `sharing` `friendly` `doctor` `counselor` |
293
+ | [Boxing Training Master](https://chat-preview.lobehub.com/market?agent=boxing-master)<br/><sup>By **[Luyi-2333](https://github.com/Luyi-2333)** on **2024-10-15**</sup> | Expert in boxing training guidance and personalized plan development<br/>`boxing-training` `personalized-plans` `fitness-guidance` `progress-evaluation` `technique-improvement` `health-and-nutrition` |
294
+
295
+ > 📊 Total agents: [<kbd>**421**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
296
296
 
297
297
  <!-- AGENT LIST -->
298
298
 
package/README.zh-CN.md CHANGED
@@ -276,12 +276,12 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
276
276
 
277
277
  | 最近新增 | 助手说明 |
278
278
  | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
279
+ | [矢量 Logo 生成器](https://chat-preview.lobehub.com/market?agent=svg-logo)<br/><sup>By **[Justin3go](https://github.com/Justin3go)** on **2024-10-27**</sup> | 擅长 UI/UX 设计与 Logo 创作<br/>`ui-ux设计` `logo设计` `用户需求` `交互设计` `工具使用` |
279
280
  | [算法解答导师](https://chat-preview.lobehub.com/market?agent=leetcode-tutor)<br/><sup>By **[Stark-X](https://github.com/Stark-X)** on **2024-10-21**</sup> | 擅长 LeetCode 算法解答与用户指导<br/>`算法` `解题` `编程` `教育` |
280
281
  | [心理咨询师](https://chat-preview.lobehub.com/market?agent=psychological-counselor)<br/><sup>By **[JIANGTUNAN](https://github.com/JIANGTUNAN)** on **2024-10-21**</sup> | 一个资深心理医生,温暖和耐心的倾听你的故事。<br/>`心理咨询` `咨询` `倾述` `友好` `医生` `咨询师` |
281
282
  | [拳击训练大师](https://chat-preview.lobehub.com/market?agent=boxing-master)<br/><sup>By **[Luyi-2333](https://github.com/Luyi-2333)** on **2024-10-15**</sup> | 擅长拳击训练指导与个性化计划制定<br/>`拳击训练` `个性化计划` `健身指导` `进度评估` `技术提升` `健康与营养` |
282
- | [椰子](https://chat-preview.lobehub.com/market?agent=deep-thinker-ai)<br/><sup>By **[hia1234](https://github.com/hia1234)** on **2024-10-15**</sup> | 在自己的回答中进行多次审查,确保聊天机器人所说的话有依据,并积极请求反馈,反复进行互动<br/>`编程` `一般` |
283
283
 
284
- > 📊 Total agents: [<kbd>**420**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
284
+ > 📊 Total agents: [<kbd>**421**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
285
285
 
286
286
  <!-- AGENT LIST -->
287
287
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.26.1",
3
+ "version": "1.26.2",
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",
@@ -7,6 +7,7 @@ import { useHotkeys } from 'react-hotkeys-hook';
7
7
  import { Flexbox } from 'react-layout-kit';
8
8
 
9
9
  import HotKeys from '@/components/HotKeys';
10
+ import { useSwitchSession } from '@/hooks/useSwitchSession';
10
11
  import { useSessionStore } from '@/store/session';
11
12
  import { sessionHelpers } from '@/store/session/helpers';
12
13
  import { sessionSelectors } from '@/store/session/selectors';
@@ -29,7 +30,8 @@ const useStyles = createStyles(({ css, token }) => ({
29
30
  const PinList = () => {
30
31
  const { styles, cx } = useStyles();
31
32
  const list = useSessionStore(sessionSelectors.pinnedSessions, isEqual);
32
- const [activeId, switchSession] = useSessionStore((s) => [s.activeId, s.switchSession]);
33
+ const [activeId] = useSessionStore((s) => [s.activeId]);
34
+ const switchSession = useSwitchSession();
33
35
 
34
36
  const hasList = list.length > 0;
35
37
  const [isPinned, setPinned] = useQueryState('pinned', parseAsBoolean);
@@ -5,11 +5,11 @@ import { useTranslation } from 'react-i18next';
5
5
  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
+ import { useSwitchSession } from '@/hooks/useSwitchSession';
8
9
  import { useServerConfigStore } from '@/store/serverConfig';
9
10
  import { useSessionStore } from '@/store/session';
10
11
 
11
12
  import ListItem from '../ListItem';
12
- import { useSwitchSession } from '../useSwitchSession';
13
13
 
14
14
  const Inbox = memo(() => {
15
15
  const { t } = useTranslation('chat');
@@ -7,13 +7,13 @@ import { Center } from 'react-layout-kit';
7
7
  import LazyLoad from 'react-lazy-load';
8
8
 
9
9
  import { SESSION_CHAT_URL } from '@/const/url';
10
+ import { useSwitchSession } from '@/hooks/useSwitchSession';
10
11
  import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
11
12
  import { useSessionStore } from '@/store/session';
12
13
  import { sessionSelectors } from '@/store/session/selectors';
13
14
  import { LobeAgentSession } from '@/types/session';
14
15
 
15
16
  import SkeletonList from '../../SkeletonList';
16
- import { useSwitchSession } from '../useSwitchSession';
17
17
  import AddButton from './AddButton';
18
18
  import SessionItem from './Item';
19
19
 
@@ -1,3 +1,4 @@
1
+ import { usePathname } from 'next/navigation';
1
2
  import { useCallback } from 'react';
2
3
 
3
4
  import { useQueryRoute } from '@/hooks/useQueryRoute';
@@ -10,15 +11,17 @@ export const useSwitchSession = () => {
10
11
  const togglePortal = useChatStore((s) => s.togglePortal);
11
12
  const mobile = useServerConfigStore((s) => s.isMobile);
12
13
  const router = useQueryRoute();
14
+ const pathname = usePathname();
13
15
 
14
16
  return useCallback(
15
17
  (id: string) => {
16
18
  switchSession(id);
17
19
  togglePortal(false);
18
20
 
19
- if (mobile) {
21
+ const chatPath = '/chat';
22
+ if (mobile || pathname !== chatPath) {
20
23
  setTimeout(() => {
21
- router.push('/chat', {
24
+ router.push(chatPath, {
22
25
  query: { session: id, showMobileWorkspace: 'true' },
23
26
  });
24
27
  }, 50);