Skip to content

Commit 6385794

Browse files
authored
fix: system plugin run time error (#1754)
1 parent b8b26ad commit 6385794

File tree

6 files changed

+16
-9
lines changed

6 files changed

+16
-9
lines changed

docSite/content/zh-cn/docs/development/upgrading/484.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ curl --location --request POST 'https://{{host}}/api/admin/init/484' \
3030
1. 新增 - 应用使用新权限系统。
3131
2. 新增 - 应用支持文件夹。
3232
3. 优化 - 文本分割增加连续换行、制表符清除,避免大文本性能问题。
33-
4. 修复 - Debug 模式下,相同 source 和 target 内容,导致连线显示异常。
34-
5. 修复 - 定时执行初始化错误。
35-
6. 修复 - 应用调用传参异常。
36-
7. 修复 - ctrl + cv 复杂节点时,nodeId错误。
37-
8. 调整组件库全局theme。
33+
4. 重要修复 - 修复系统插件运行池数据污染问题,由于从内存获取,会导致全局污染。
34+
5. 修复 - Debug 模式下,相同 source 和 target 内容,导致连线显示异常。
35+
6. 修复 - 定时执行初始化错误。
36+
7. 修复 - 应用调用传参异常。
37+
8. 修复 - ctrl + cv 复杂节点时,nodeId错误。
38+
9. 调整组件库全局theme。

packages/service/core/plugin/controller.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import type { PluginRuntimeType, PluginTemplateType } from '@fastgpt/global/core
77
import { FlowNodeTemplateTypeEnum } from '@fastgpt/global/core/workflow/constants';
88
import { getHandleConfig } from '../../../global/core/workflow/template/utils';
99
import { getNanoid } from '@fastgpt/global/common/string/tools';
10+
import { cloneDeep } from 'lodash';
1011

1112
/*
1213
plugin id rule:
@@ -36,7 +37,7 @@ const getPluginTemplateById = async (id: string): Promise<PluginTemplateType> =>
3637
const item = global.communityPlugins?.find((plugin) => plugin.id === pluginId);
3738
if (!item) return Promise.reject('plugin not found');
3839

39-
return item;
40+
return cloneDeep(item);
4041
}
4142
if (source === PluginSourceEnum.personal) {
4243
const item = await MongoPlugin.findById(id).lean();

packages/service/core/workflow/dispatch/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,6 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
270270
nodes: runtimeNodes,
271271
variables
272272
});
273-
// console.log(JSON.stringify(input, null, 2), '=====================');
274-
275273
// format valueType
276274
params[input.key] = valueTypeFormat(value, input.valueType);
277275
});

packages/service/core/workflow/dispatch/tools/http468.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
5050
variables,
5151
node: { outputs },
5252
histories,
53-
isToolCall,
5453
params: {
5554
system_httpMethod: httpMethod = 'POST',
5655
system_httpReqUrl: httpReqUrl,

packages/service/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"decompress": "^4.2.1",
1616
"domino-ext": "^2.1.4",
1717
"encoding": "^0.1.13",
18+
"lodash": "^4.17.21",
1819
"file-type": "^19.0.0",
1920
"iconv-lite": "^0.6.3",
2021
"joplin-turndown-plugin-gfm": "^1.0.12",
@@ -41,6 +42,7 @@
4142
"@types/multer": "^1.4.10",
4243
"@types/node-cron": "^3.0.11",
4344
"@types/papaparse": "5.3.7",
45+
"@types/lodash": "^4.14.191",
4446
"@types/pg": "^8.6.6",
4547
"@types/tunnel": "^0.0.4",
4648
"@types/turndown": "^5.0.4"

pnpm-lock.yaml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)