-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* perf: runtime props * fix: Plugin run faied in debug mode * perf: variable update * fix: ts * perf: variable ui
- Loading branch information
Showing
37 changed files
with
398 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
packages/global/core/workflow/template/system/variableUpdate/type.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import { FlowNodeInputTypeEnum } from 'core/workflow/node/constant'; | ||
import { FlowNodeInputTypeEnum } from '../../../node/constant'; | ||
import { ReferenceValueProps } from '../../..//type/io'; | ||
import { WorkflowIOValueTypeEnum } from '../../../constants'; | ||
|
||
export type TUpdateListItem = { | ||
variable?: ReferenceValueProps; | ||
value?: ReferenceValueProps; | ||
renderType?: FlowNodeInputTypeEnum.input | FlowNodeInputTypeEnum.reference; | ||
value: ReferenceValueProps; | ||
valueType?: WorkflowIOValueTypeEnum; | ||
renderType: FlowNodeInputTypeEnum.input | FlowNodeInputTypeEnum.reference; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 9 additions & 5 deletions
14
packages/service/core/workflow/dispatch/init/workflowStart.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
import { chatValue2RuntimePrompt } from '@fastgpt/global/core/chat/adapt'; | ||
import { UserChatItemValueItemType } from '@fastgpt/global/core/chat/type'; | ||
import { NodeInputKeyEnum } from '@fastgpt/global/core/workflow/constants'; | ||
import type { ModuleDispatchProps } from '@fastgpt/global/core/workflow/type/index.d'; | ||
export type UserChatInputProps = ModuleDispatchProps<{ | ||
[NodeInputKeyEnum.userChatInput]: string; | ||
[NodeInputKeyEnum.inputFiles]: UserChatItemValueItemType['file'][]; | ||
}>; | ||
|
||
export const dispatchWorkflowStart = (props: Record<string, any>) => { | ||
const { | ||
variables: { userChatInput }, | ||
params: { userChatInput: query } | ||
} = props as UserChatInputProps; | ||
const { query } = props as UserChatInputProps; | ||
|
||
const { text, files } = chatValue2RuntimePrompt(query); | ||
|
||
return { | ||
userChatInput: query || userChatInput | ||
[NodeInputKeyEnum.userChatInput]: text, | ||
[NodeInputKeyEnum.inputFiles]: files | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.