mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-29 09:44:47 +00:00
Perf workflow (#1492)
* perf: handle edge check * search model * feat: plugin input can render all input; fix: plugin default value * fix ts * feat: plugin input support required
This commit is contained in:
@@ -131,7 +131,7 @@ const RenderHeaderContainer = React.memo(function RenderHeaderContainer({
|
||||
|
||||
return null;
|
||||
},
|
||||
[isShowVersionHistories, edges, updateAppDetail, app._id, t]
|
||||
[isV2Workflow, isShowVersionHistories, edges, updateAppDetail, app._id, t]
|
||||
);
|
||||
|
||||
const onclickPublish = useCallback(async () => {
|
||||
|
@@ -196,7 +196,10 @@ export async function getServerSideProps(context: any) {
|
||||
const currentTab = context?.query?.currentTab || TabEnum.simpleEdit;
|
||||
|
||||
return {
|
||||
props: { currentTab, ...(await serviceSideProps(context, ['app', 'file', 'publish'])) }
|
||||
props: {
|
||||
currentTab,
|
||||
...(await serviceSideProps(context, ['app', 'file', 'publish', 'workflow']))
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -91,7 +91,7 @@ export async function getServerSideProps(context: any) {
|
||||
return {
|
||||
props: {
|
||||
pluginId: context?.query?.pluginId || '',
|
||||
...(await serviceSideProps(context))
|
||||
...(await serviceSideProps(context, ['app', 'workflow']))
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@ import { MongoImageTypeEnum } from '@fastgpt/global/common/file/image/constants'
|
||||
import { PluginTypeEnum } from '@fastgpt/global/core/plugin/constants';
|
||||
import { useWorkflowStore } from '@/web/core/workflow/store/workflow';
|
||||
import { EditFormType } from './type';
|
||||
import { FlowNodeTypeEnum } from '@fastgpt/global/core/workflow/node/constant';
|
||||
const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz1234567890', 12);
|
||||
|
||||
export const defaultForm: EditFormType = {
|
||||
@@ -33,7 +34,7 @@ export const defaultForm: EditFormType = {
|
||||
nodeId: nanoid(),
|
||||
name: '自定义插件输入',
|
||||
avatar: '/imgs/workflow/input.png',
|
||||
flowNodeType: 'pluginInput',
|
||||
flowNodeType: FlowNodeTypeEnum.pluginInput,
|
||||
showStatus: false,
|
||||
position: {
|
||||
x: 616.4226348688949,
|
||||
@@ -47,7 +48,7 @@ export const defaultForm: EditFormType = {
|
||||
nodeId: nanoid(),
|
||||
name: '自定义插件输出',
|
||||
avatar: '/imgs/workflow/output.png',
|
||||
flowNodeType: 'pluginOutput',
|
||||
flowNodeType: FlowNodeTypeEnum.pluginOutput,
|
||||
showStatus: false,
|
||||
position: {
|
||||
x: 1607.7142331269126,
|
||||
|
Reference in New Issue
Block a user