Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
845f4d41
authored
Aug 01, 2025
by
Archer
Committed by
GitHub
Aug 01, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: tool not clone (#5364)
* fix: tool not clone * perf: check invalid db tool
parent
6ac03dbf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
packages/service/core/app/plugin/controller.ts
+4
-3
No files found.
packages/service/core/app/plugin/controller.ts
View file @
845f4d41
...
...
@@ -41,11 +41,11 @@ import type {
}
from
'@fastgpt/global/core/workflow/type/io'
;
import
{
isProduction
}
from
'@fastgpt/global/common/system/constants'
;
import
{
Output_Template_Error_Message
}
from
'@fastgpt/global/core/workflow/template/output'
;
import
type
{
RuntimeNodeItemType
}
from
'@fastgpt/global/core/workflow/runtime/type'
;
import
{
splitCombinePluginId
}
from
'@fastgpt/global/core/app/plugin/utils'
;
import
{
getMCPToolRuntimeNode
}
from
'@fastgpt/global/core/app/mcpTools/utils'
;
import
{
AppTypeEnum
}
from
'@fastgpt/global/core/app/constants'
;
import
{
getMCPChildren
}
from
'../mcp'
;
import
{
cloneDeep
}
from
'lodash'
;
type
ChildAppType
=
SystemPluginTemplateItemType
&
{
teamId
?:
string
;
...
...
@@ -562,8 +562,9 @@ export const getSystemTools = async (): Promise<SystemPluginTemplateItemType[]>
};
});
// TODO: Check the app exists
const
dbPlugins
=
systemPluginsArray
.
filter
((
item
)
=>
item
.
customConfig
)
.
filter
((
item
)
=>
item
.
customConfig
?.
associatedPluginId
)
.
map
((
item
)
=>
dbPluginFormat
(
item
));
const
plugins
=
[...
formatTools
,
...
dbPlugins
];
...
...
@@ -584,7 +585,7 @@ export const getSystemToolById = async (id: string): Promise<SystemPluginTemplat
const
tools
=
await
getSystemTools
();
const
tool
=
tools
.
find
((
item
)
=>
item
.
id
===
pluginId
);
if
(
tool
)
{
return
tool
;
return
cloneDeep
(
tool
)
;
}
return
Promise
.
reject
(
PluginErrEnum
.
unExist
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment