Skip to content

Commit 7b3fa29

Browse files
authored
Dev transition debug (#382)
1 parent 3179f23 commit 7b3fa29

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

web/apps/web/src/components/app/node-form/widgets/variable-select/use-select-options.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ export const useSelectOptions = (name?: string) => {
2222
let taskIndex: number | undefined;
2323
if (
2424
parent?.startsWith(`${reservedKeySchema.Enum.condition}.`) ||
25-
name?.startsWith(reservedKeySchema.Enum.condition)
25+
name?.startsWith(reservedKeySchema.Enum.condition) ||
26+
name?.startsWith(reservedKeySchema.Enum.target_inputs)
2627
) {
2728
refType = refTypeSchema.Enum.target_input;
2829
} else if (parent?.startsWith(`${reservedKeySchema.Enum.inputs}.`)) {

web/packages/shared/src/protocol/app-scope/__test__/protocol.spec.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ describe('protocol', () => {
115115
reservedKeySchema.parse('condition');
116116
reservedKeySchema.parse('blocks');
117117
reservedKeySchema.parse('buttons');
118+
reservedKeySchema.parse('target_inputs');
118119
});
119120

120121
describe('invalid', () => {
@@ -140,10 +141,11 @@ describe('protocol', () => {
140141
"payload",
141142
"condition",
142143
"blocks",
143-
"buttons"
144+
"buttons",
145+
"target_inputs"
144146
],
145147
"path": [],
146-
"message": "Invalid enum value. Expected 'type' | 'id' | 'properties' | 'inputs' | 'outputs' | 'tasks' | 'render' | 'transitions' | 'states' | 'context' | 'payload' | 'condition' | 'blocks' | 'buttons', received 'type1'"
148+
"message": "Invalid enum value. Expected 'type' | 'id' | 'properties' | 'inputs' | 'outputs' | 'tasks' | 'render' | 'transitions' | 'states' | 'context' | 'payload' | 'condition' | 'blocks' | 'buttons' | 'target_inputs', received 'type1'"
147149
}
148150
]"
149151
`);

web/packages/shared/src/protocol/pro-config/common.ts

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const reservedKeySchema = z.enum([
3636
'condition',
3737
'blocks',
3838
'buttons',
39+
'target_inputs',
3940
]);
4041

4142
export const systemContextSchema = z.enum(['USER_WALLET', 'BOT_WALLET']);

0 commit comments

Comments
 (0)