feat(custom-fields) : add machineContextOnly toggle in structure editors
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -88,6 +88,7 @@ const toEditorField = (
|
||||
...(typeof input?.id === 'string' && input.id ? { id: input.id } : {}),
|
||||
...(typeof input?.customFieldId === 'string' && input.customFieldId ? { customFieldId: input.customFieldId } : {}),
|
||||
orderIndex: typeof input?.orderIndex === 'number' ? input.orderIndex : index,
|
||||
machineContextOnly: Boolean(input?.machineContextOnly),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,6 +163,7 @@ const buildPayload = (
|
||||
type,
|
||||
required,
|
||||
orderIndex: index,
|
||||
machineContextOnly: Boolean(field.machineContextOnly),
|
||||
}
|
||||
|
||||
if (field.id) {
|
||||
@@ -286,6 +288,7 @@ export function usePieceStructureEditorLogic(deps: Deps) {
|
||||
type: 'text',
|
||||
required: false,
|
||||
optionsText: '',
|
||||
machineContextOnly: false,
|
||||
orderIndex,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user