Skip to content

Commit f0acfc0

Browse files
committed
fix form state type
1 parent 59454df commit f0acfc0

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

web/apps/web/src/components/app/nodes/form-node/index.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ import {
88
StateNode as StateNodeType,
99
TargetHandle,
1010
useReactFlowStore,
11-
DRAGGABLE_NODE_ID,
12-
DraggableNodeType,
13-
useDrop,
1411
} from '@shellagent/flow-engine';
1512
import { TValues } from '@shellagent/form-engine';
1613
import { RefSceneEnum } from '@shellagent/shared/protocol/app-scope';

web/apps/web/src/stores/app/schema-provider.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { getIntroSchema } from '@/stores/app/schema/get-intro-schema';
88
import { getStateSchema } from '@/stores/app/schema/get-state-schema';
99
import { generateUUID } from '@/utils/common-helper';
1010

11-
import { getConditionStateSchema } from './schema/condition-state-schema';
11+
import { conditionConfigSchema } from './schema/condition-state-schema';
1212
import { formConfigSchema } from './schema/form-config';
1313
import { introConfigSchema } from './schema/intro-config';
1414
import { startSchema } from './schema/start-node';
@@ -109,7 +109,7 @@ export const SchemaProvider: React.FC<SchemaProviderProps> = ({
109109
}
110110

111111
if (type === 'condition-state-config') {
112-
return getConditionStateSchema;
112+
return conditionConfigSchema;
113113
}
114114

115115
if (type === NodeTypeEnum.state) {

web/apps/web/src/stores/app/schema/condition-state-schema.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { FieldModeEnum } from '@shellagent/shared/protocol/extend-config';
44
import { validateCustomKey } from '@/stores/app/utils/validator';
55
import { ENABLE_MIME } from '@/utils/file-types';
66

7-
export const getConditionStateSchema: ISchema = {
7+
export const conditionConfigSchema: ISchema = {
88
type: 'object',
99
'x-type': 'Block',
1010
'x-title-size': 'h5',

web/apps/web/src/stores/app/schema/form-config.ts

-15
Original file line numberDiff line numberDiff line change
@@ -789,20 +789,5 @@ export const formConfigSchema: ISchema = {
789789
'x-collapsible': true,
790790
'x-addable': true,
791791
},
792-
id: {
793-
type: 'string',
794-
default: '',
795-
'x-hidden': true,
796-
},
797-
name: {
798-
type: 'string',
799-
default: '',
800-
'x-hidden': true,
801-
},
802-
type: {
803-
type: 'string',
804-
default: 'state',
805-
'x-hidden': true,
806-
},
807792
},
808793
};

web/apps/web/src/stores/app/schema/get-form-schema.ts

+17
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,22 @@ export const getFormSchema = (name: string): ISchema => {
1212
'p-3 border-b-[0.3px] border-default bg-utility-khaki-10 rounded-t-lg',
1313
'x-class': 'px-3 pb-3 rounded-lg mt-0',
1414
'x-title-copiable': false,
15+
properties: {
16+
id: {
17+
type: 'string',
18+
default: '',
19+
'x-hidden': true,
20+
},
21+
name: {
22+
type: 'string',
23+
default: '',
24+
'x-hidden': true,
25+
},
26+
type: {
27+
type: 'string',
28+
default: 'form',
29+
'x-hidden': true,
30+
},
31+
},
1532
};
1633
};

web/apps/web/src/stores/app/schema/get-intro-schema.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const getIntroSchema = (name: string): ISchema => {
3232
},
3333
type: {
3434
type: 'string',
35-
default: 'state',
35+
default: 'intro',
3636
'x-hidden': true,
3737
},
3838
render: {

web/apps/web/src/stores/app/schema/intro-config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export const introConfigSchema: ISchema = {
149149
},
150150
type: {
151151
type: 'string',
152-
default: 'state',
152+
default: 'intro',
153153
'x-hidden': true,
154154
},
155155
},

web/packages/shared/src/protocol/transition/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export enum TransitionTypeEnum {
2323
intro = NodeTypeEnum.intro,
2424
state = NodeTypeEnum.state,
2525
condition_state = NodeTypeEnum.condition_state,
26+
form = NodeTypeEnum.form,
2627
}
2728

2829
// 临时

0 commit comments

Comments
 (0)