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
fa80ce3a
authored
May 29, 2025
by
heheer
Committed by
GitHub
May 29, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix child app external variables (#4919)
parent
830358aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
packages/service/core/workflow/dispatch/index.ts
+0
-1
packages/service/core/workflow/dispatch/plugin/run.ts
+4
-1
packages/service/core/workflow/dispatch/plugin/runApp.ts
+4
-1
No files found.
packages/service/core/workflow/dispatch/index.ts
View file @
fa80ce3a
...
...
@@ -11,7 +11,6 @@ import type {
SystemVariablesType
}
from
'@fastgpt/global/core/workflow/runtime/type'
;
import
type
{
RuntimeNodeItemType
}
from
'@fastgpt/global/core/workflow/runtime/type.d'
;
import
type
{
FlowNodeOutputItemType
}
from
'@fastgpt/global/core/workflow/type/io.d'
;
import
type
{
AIChatItemValueItemType
,
ChatHistoryItemResType
,
...
...
packages/service/core/workflow/dispatch/plugin/run.ts
View file @
fa80ce3a
...
...
@@ -17,6 +17,7 @@ import { chatValue2RuntimePrompt } from '@fastgpt/global/core/chat/adapt';
import
{
getPluginRunUserQuery
}
from
'@fastgpt/global/core/workflow/utils'
;
import
{
getPluginInputsFromStoreNodes
}
from
'@fastgpt/global/core/app/plugin/utils'
;
import
type
{
NodeInputKeyEnum
}
from
'@fastgpt/global/core/workflow/constants'
;
import
{
getUserChatInfoAndAuthTeamPoints
}
from
'../../../../support/permission/auth/team'
;
type
RunPluginProps
=
ModuleDispatchProps
<
{
[
NodeInputKeyEnum
.
forbidStream
]?:
boolean
;
...
...
@@ -73,9 +74,11 @@ export const dispatchRunPlugin = async (props: RunPluginProps): Promise<RunPlugi
};
});
const
{
externalProvider
}
=
await
getUserChatInfoAndAuthTeamPoints
(
runningAppInfo
.
tmbId
);
const
runtimeVariables
=
{
...
filterSystemVariables
(
props
.
variables
),
appId
:
String
(
plugin
.
id
)
appId
:
String
(
plugin
.
id
),
...(
externalProvider
?
externalProvider
.
externalWorkflowVariables
:
{})
};
const
{
flowResponses
,
flowUsages
,
assistantResponses
,
runTimes
}
=
await
dispatchWorkFlow
({
...
props
,
...
...
packages/service/core/workflow/dispatch/plugin/runApp.ts
View file @
fa80ce3a
...
...
@@ -20,6 +20,7 @@ import { ReadPermissionVal } from '@fastgpt/global/support/permission/constant';
import
{
getAppVersionById
}
from
'../../../app/version/controller'
;
import
{
parseUrlToFileType
}
from
'@fastgpt/global/common/file/tools'
;
import
{
type
ChildrenInteractive
}
from
'@fastgpt/global/core/workflow/template/system/interactive/type'
;
import
{
getUserChatInfoAndAuthTeamPoints
}
from
'../../../../support/permission/auth/team'
;
type
Props
=
ModuleDispatchProps
<
{
[
NodeInputKeyEnum
.
userChatInput
]:
string
;
...
...
@@ -97,11 +98,13 @@ export const dispatchRunAppNode = async (props: Props): Promise<Response> => {
// Rewrite children app variables
const
systemVariables
=
filterSystemVariables
(
variables
);
const
{
externalProvider
}
=
await
getUserChatInfoAndAuthTeamPoints
(
appData
.
tmbId
);
const
childrenRunVariables
=
{
...
systemVariables
,
...
childrenAppVariables
,
histories
:
chatHistories
,
appId
:
String
(
appData
.
_id
)
appId
:
String
(
appData
.
_id
),
...(
externalProvider
?
externalProvider
.
externalWorkflowVariables
:
{})
};
const
childrenInteractive
=
...
...
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