Skip to content

Commit

Permalink
fix: system plugin run time error (#1754)
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu authored Jun 13, 2024
1 parent b8b26ad commit 6385794
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
11 changes: 6 additions & 5 deletions docSite/content/zh-cn/docs/development/upgrading/484.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ curl --location --request POST 'https://{{host}}/api/admin/init/484' \
1. 新增 - 应用使用新权限系统。
2. 新增 - 应用支持文件夹。
3. 优化 - 文本分割增加连续换行、制表符清除,避免大文本性能问题。
4. 修复 - Debug 模式下,相同 source 和 target 内容,导致连线显示异常。
5. 修复 - 定时执行初始化错误。
6. 修复 - 应用调用传参异常。
7. 修复 - ctrl + cv 复杂节点时,nodeId错误。
8. 调整组件库全局theme。
4. 重要修复 - 修复系统插件运行池数据污染问题,由于从内存获取,会导致全局污染。
5. 修复 - Debug 模式下,相同 source 和 target 内容,导致连线显示异常。
6. 修复 - 定时执行初始化错误。
7. 修复 - 应用调用传参异常。
8. 修复 - ctrl + cv 复杂节点时,nodeId错误。
9. 调整组件库全局theme。
3 changes: 2 additions & 1 deletion packages/service/core/plugin/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type { PluginRuntimeType, PluginTemplateType } from '@fastgpt/global/core
import { FlowNodeTemplateTypeEnum } from '@fastgpt/global/core/workflow/constants';
import { getHandleConfig } from '../../../global/core/workflow/template/utils';
import { getNanoid } from '@fastgpt/global/common/string/tools';
import { cloneDeep } from 'lodash';

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

return item;
return cloneDeep(item);
}
if (source === PluginSourceEnum.personal) {
const item = await MongoPlugin.findById(id).lean();
Expand Down
2 changes: 0 additions & 2 deletions packages/service/core/workflow/dispatch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
nodes: runtimeNodes,
variables
});
// console.log(JSON.stringify(input, null, 2), '=====================');

// format valueType
params[input.key] = valueTypeFormat(value, input.valueType);
});
Expand Down
1 change: 0 additions & 1 deletion packages/service/core/workflow/dispatch/tools/http468.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
variables,
node: { outputs },
histories,
isToolCall,
params: {
system_httpMethod: httpMethod = 'POST',
system_httpReqUrl: httpReqUrl,
Expand Down
2 changes: 2 additions & 0 deletions packages/service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"decompress": "^4.2.1",
"domino-ext": "^2.1.4",
"encoding": "^0.1.13",
"lodash": "^4.17.21",
"file-type": "^19.0.0",
"iconv-lite": "^0.6.3",
"joplin-turndown-plugin-gfm": "^1.0.12",
Expand All @@ -41,6 +42,7 @@
"@types/multer": "^1.4.10",
"@types/node-cron": "^3.0.11",
"@types/papaparse": "5.3.7",
"@types/lodash": "^4.14.191",
"@types/pg": "^8.6.6",
"@types/tunnel": "^0.0.4",
"@types/turndown": "^5.0.4"
Expand Down
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6385794

Please sign in to comment.