Skip to content

Commit c166a57

Browse files
authored
doc (#5472)
* doc * fix: pane undefined * fix: pane undefined
1 parent 2c91137 commit c166a57

File tree

4 files changed

+24
-7
lines changed

4 files changed

+24
-7
lines changed

document/content/docs/upgrading/4-12/4121.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
---
2-
title: 'V4.12.1(进行中)'
2+
title: 'V4.12.1'
33
description: 'FastGPT V4.12.1 更新说明'
44
---
55

6+
## 更新指南
7+
8+
### 1. 更新镜像:
9+
10+
- 更新 FastGPT 镜像tag: v4.12.1
11+
- 更新 FastGPT 商业版镜像tag: v4.12.1
12+
- 更新 fastgpt-plugin 镜像 tag: v0.1.10
13+
- mcp_server 无需更新
14+
- Sandbox 无需更新
15+
- AIProxy 无需更新
16+
617
## 🚀 新增内容
718

819
1. Prompt 自动生成和优化。

document/data/doc-last-modified.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
"document/content/docs/upgrading/4-11/4110.mdx": "2025-08-05T23:20:39+08:00",
104104
"document/content/docs/upgrading/4-11/4111.mdx": "2025-08-07T22:49:09+08:00",
105105
"document/content/docs/upgrading/4-12/4120.mdx": "2025-08-12T22:45:19+08:00",
106-
"document/content/docs/upgrading/4-12/4121.mdx": "2025-08-15T17:10:04+08:00",
106+
"document/content/docs/upgrading/4-12/4121.mdx": "2025-08-15T17:56:49+08:00",
107107
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
108108
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
109109
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",

projects/app/src/web/core/chat/context/chatSettingContext.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { useChatStore } from '@/web/core/chat/context/useChatStore';
99
import type { ChatSettingSchema } from '@fastgpt/global/core/chat/setting/type';
1010
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
1111
import { useRouter } from 'next/router';
12-
import { useCallback, useMemo, useState } from 'react';
12+
import { useCallback, useEffect, useMemo, useState } from 'react';
1313
import { createContext } from 'use-context-selector';
1414

1515
type ChatSettingReturnType = ChatSettingSchema | undefined;
@@ -94,9 +94,15 @@ export const ChatSettingContextProvider = ({ children }: { children: React.React
9494
setLastPane(newPane);
9595
setLastChatAppId(_id);
9696
},
97-
[setLastPane, chatSettings?.appId, appId, router, pane]
97+
[pane, router, setLastPane, setLastChatAppId, chatSettings?.appId]
9898
);
9999

100+
useEffect(() => {
101+
if (!Object.values(ChatSidebarPaneEnum).includes(pane)) {
102+
handlePaneChange(ChatSidebarPaneEnum.HOME);
103+
}
104+
}, [pane]);
105+
100106
const logos: Pick<ChatSettingSchema, 'wideLogoUrl' | 'squareLogoUrl'> = useMemo(
101107
() => ({
102108
wideLogoUrl: chatSettings?.wideLogoUrl,

projects/app/src/web/core/chat/context/useChatStore.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { create, createJSONStorage, devtools, persist, immer } from '@fastgpt/we
22
import { getNanoid } from '@fastgpt/global/common/string/tools';
33
import { type OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
44
import type { ChatSourceEnum } from '@fastgpt/global/core/chat/constants';
5-
import type { ChatSidebarPaneEnum } from '@/pageComponents/chat/constants';
5+
import { ChatSidebarPaneEnum } from '@/pageComponents/chat/constants';
66

77
type State = {
88
source?: `${ChatSourceEnum}`;
@@ -17,7 +17,7 @@ type State = {
1717
chatId: string;
1818
setChatId: (e?: string) => any;
1919

20-
lastPane?: ChatSidebarPaneEnum;
20+
lastPane: ChatSidebarPaneEnum;
2121
setLastPane: (e: ChatSidebarPaneEnum) => any;
2222

2323
outLinkAuthData: OutLinkChatAuthProps;
@@ -116,7 +116,7 @@ export const useChatStore = create<State>()(
116116
state.lastChatAppId = e;
117117
});
118118
},
119-
lastPane: undefined,
119+
lastPane: ChatSidebarPaneEnum.HOME,
120120
setLastPane(e) {
121121
set((state) => {
122122
state.lastPane = e;

0 commit comments

Comments
 (0)