Studio
Custom field actions
Enhancements and examples for custom field actions
v4.4.0
More goodies for building custom field actions
In the versions released since 4.3.0, 4.4.0 includes:
useFieldActions
now receivesparentSchemaType
as a prop, making it easier to conditionally include actions for sub-fields in images or other object types.isType
helper function for checking if aschemaType
is of a certain type. Useful for conditionally including actions based on some parent type, for instance:isType(schemaType, 'image')
orisType(schemaType, 'string')
useFieldActions
is allowed to includeundefined
values in the returned array. This makes it easier to conditionally exclude actions as needed.
How-to-use
The repository now contains multiple copy/paste-able examples of integrating AI Assist with Agent Actions:
- Just getting started with AI Assist's custom actions? Check out the guide.
- Explore the how-to-use examples in the repo.
Custom field actions: Bring Agent Actions into AI Assist
v4.3.0
Custom field actions

To incorporate Agent Actions or other custom actions into the AI Assist document and field action menus, you can now use the fieldActions
plugin configuration in AI Assist. Get started with the custom field actions guide.
assist({
fieldActions: {
title: 'Custom actions',
useFieldActions: (props: AssistFieldActionProps) => {
return useMemo(() => [
defineAssistFieldAction({
title: 'Do something',
icon: ActionIcon,
onAction: async () => {
// perform an (async) action
// errors will be caught and displayed in a toast
// until the action completes or fails, AI Assist "presence" will show up on the top of the document
},
})], [])
}
}
})