Skip to content

Commit 0aebb73

Browse files
authored
fix: share field filter (#6905)
* fix: share field filter * perf: review
1 parent f4e0900 commit 0aebb73

16 files changed

Lines changed: 149 additions & 49 deletions

File tree

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"recommendations": [
3+
"dbaeumer.vscode-eslint",
34
"alexcvzz.vscode-sqlite"
45
]
5-
}
6+
}

.vscode/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,22 @@
22
"editor.formatOnSave": true,
33
"editor.mouseWheelZoom": true,
44
"editor.defaultFormatter": "esbenp.prettier-vscode",
5+
"editor.codeActionsOnSave": {
6+
"source.fixAll.eslint": "explicit"
7+
},
58
"prettier.prettierPath": "node_modules/prettier",
9+
"eslint.useFlatConfig": true,
10+
"eslint.workingDirectories": [
11+
{
12+
"mode": "auto"
13+
}
14+
],
15+
"eslint.validate": [
16+
"javascript",
17+
"javascriptreact",
18+
"typescript",
19+
"typescriptreact"
20+
],
621
"i18n-ally.localesPaths": [
722
"packages/web/i18n",
823
],
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: 'V4.14.19'
3+
description: 'FastGPT V4.14.19 release notes'
4+
---
5+
6+
## Upgrade Guide
7+
8+
### 1. Update image tags
9+
10+
- Update the fastgpt-app image tag (FastGPT main service): v4.14.19
11+
- Update the fastgpt-pro image tag (FastGPT commercial edition): v4.14.19
12+
13+
## ⚙️ Improvements
14+
15+
1. Improved browser compatibility for lower kernel versions.
16+
17+
## 🐛 Fixes
18+
19+
1. Fixed an issue where form inputs did not filter out icons for file-type fields, causing oversized request bodies.
20+
2. Fixed an issue where shared links did not correctly show the sandbox file entry.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: 'V4.14.19'
3+
description: 'FastGPT V4.14.19 更新说明'
4+
---
5+
6+
## 升级指南
7+
8+
### 1. 更新镜像 tag
9+
10+
- 更新 fastgpt-app(fastgpt 主服务) 镜像 tag: v4.14.19
11+
- 更新 fastgpt-pro(fastgpt 商业版) 镜像 tag: v4.14.19
12+
13+
## ⚙️ 优化
14+
15+
1. 兼容更低版本内核的浏览器。
16+
17+
## 🐛 修复
18+
19+
1. 表单输入,文件类型时,未过滤掉 icon,导致请求体过大。
20+
2. 分享链接,未正确展示虚拟机文件入口。

document/content/self-host/upgrading/4-14/meta.en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"title": "4.14.x",
33
"description": "",
44
"pages": [
5+
"41419",
56
"41418",
67
"41417",
78
"41416",

document/content/self-host/upgrading/4-14/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"title": "4.14.x",
33
"description": "",
44
"pages": [
5+
"41419",
56
"41418",
67
"41417",
78
"41416",

document/content/toc.en.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ description: FastGPT Toc
126126
- [/en/self-host/upgrading/4-14/41414](/en/self-host/upgrading/4-14/41414)
127127
- [/en/self-host/upgrading/4-14/41415](/en/self-host/upgrading/4-14/41415)
128128
- [/en/self-host/upgrading/4-14/41416](/en/self-host/upgrading/4-14/41416)
129+
- [/en/self-host/upgrading/4-14/41419](/en/self-host/upgrading/4-14/41419)
129130
- [/en/self-host/upgrading/4-14/4142](/en/self-host/upgrading/4-14/4142)
130131
- [/en/self-host/upgrading/4-14/4143](/en/self-host/upgrading/4-14/4143)
131132
- [/en/self-host/upgrading/4-14/4144](/en/self-host/upgrading/4-14/4144)

document/content/toc.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ description: FastGPT 文档目录
128128
- [/self-host/upgrading/4-14/41416](/self-host/upgrading/4-14/41416)
129129
- [/self-host/upgrading/4-14/41417](/self-host/upgrading/4-14/41417)
130130
- [/self-host/upgrading/4-14/41418](/self-host/upgrading/4-14/41418)
131+
- [/self-host/upgrading/4-14/41419](/self-host/upgrading/4-14/41419)
131132
- [/self-host/upgrading/4-14/4142](/self-host/upgrading/4-14/4142)
132133
- [/self-host/upgrading/4-14/4143](/self-host/upgrading/4-14/4143)
133134
- [/self-host/upgrading/4-14/4144](/self-host/upgrading/4-14/4144)

document/data/doc-last-modified.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
"content/self-host/upgrading/4-14/41481.mdx": "2026-04-26T21:08:47+08:00",
270270
"content/self-host/upgrading/4-14/4149.en.mdx": "2026-04-26T21:08:47+08:00",
271271
"content/self-host/upgrading/4-14/4149.mdx": "2026-04-26T21:08:47+08:00",
272-
"content/self-host/upgrading/4-15/4150.mdx": "2026-05-09T11:28:39+08:00",
272+
"content/self-host/upgrading/4-15/4150.mdx": "2026-05-09T14:27:39+08:00",
273273
"content/self-host/upgrading/outdated/40.en.mdx": "2026-04-26T21:08:47+08:00",
274274
"content/self-host/upgrading/outdated/40.mdx": "2026-04-26T21:08:47+08:00",
275275
"content/self-host/upgrading/outdated/41.en.mdx": "2026-04-26T21:08:47+08:00",

packages/global/core/chat/utils.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ ${stepText}`;
9898
// Concat 2 -> 1, and sort by role
9999
export const concatHistories = (histories1: ChatItemMiniType[], histories2: ChatItemMiniType[]) => {
100100
const newHistories = [...histories1, ...histories2];
101-
return newHistories.sort((a, b) => {
101+
return newHistories.sort((a) => {
102102
if (a.obj === ChatRoleEnum.System) {
103103
return -1;
104104
}
@@ -110,7 +110,6 @@ export const getChatTitleFromChatMessage = (
110110
message?: ChatItemMiniType,
111111
defaultValue = '新对话'
112112
) => {
113-
// @ts-ignore
114113
const textMsg = message?.value.find((item) => 'text' in item && item.text);
115114

116115
if (textMsg?.text?.content) {
@@ -185,32 +184,32 @@ export const filterPublicNodeResponseData = ({
185184
[FlowNodeTypeEnum.agent]: true,
186185
[FlowNodeTypeEnum.pluginOutput]: true,
187186
[FlowNodeTypeEnum.runApp]: true,
188-
[FlowNodeTypeEnum.toolCall]: true
187+
[FlowNodeTypeEnum.toolCall]: true,
188+
[FlowNodeTypeEnum.tool]: true
189189
};
190190

191+
const commonFields = {
192+
moduleType: true,
193+
pluginOutput: true,
194+
runningTime: true,
195+
toolId: true
196+
};
191197
const filedMap: Record<string, boolean> = responseDetail
192198
? {
193199
quoteList: true,
194-
moduleType: true,
195-
pluginOutput: true,
196-
runningTime: true
200+
...commonFields
197201
}
198-
: {
199-
moduleType: true,
200-
pluginOutput: true,
201-
runningTime: true
202-
};
202+
: commonFields;
203203

204204
return nodeRespones
205205
.filter((item) => publicNodeMap[item.moduleType])
206206
.map((item) => {
207207
const obj: DispatchNodeResponseType = {};
208-
for (let key in item) {
208+
for (const key in item) {
209209
if (key === 'toolDetail' || key === 'pluginDetail') {
210-
// @ts-ignore
211210
obj[key] = filterPublicNodeResponseData({ nodeRespones: item[key], responseDetail });
212211
} else if (filedMap[key]) {
213-
// @ts-ignore
212+
// @ts-expect-error Dynamic public field copy is constrained by filedMap.
214213
obj[key] = item[key];
215214
}
216215
}

0 commit comments

Comments
 (0)