Skip to main content
Premium

SchemaAiAssistantButton

Opens an AI assistant dialog pre-filled with the current form's field values. The dialog talks to a backend AI endpoint and lets the user apply the suggestions back into the form.

Premium

The button ships in habarico-enterprise, and so does the backend it talks to. The ai-assistant action type stays in the free vocabulary — without the paid frontend package the action simply renders nothing.

enterpriseButtonProvider mounts it for you wherever the resource schema exposes an ai-assistant action, so a backend that enables the AI integration gets the button without any frontend change beyond installing the package. Mount it by hand only on a form you assembled yourself.

Example​

import {SchemaAiAssistantButton} from '@eluvia/habarico-enterprise';

<SchemaAiAssistantButton endpoint={actionSchema.endpoint} label="AI assistant" />;

Props​

On top of endpoint it accepts every ActionButtonProps except type — label, icon, surface, showLabel, variant, color, size, loading, disabled, tooltip, confirm, resource, onSuccess, sx, className.

NameTypeDefaultDescription
endpoint (required)ResourceActionEndpointParameters—The ai-assistant action's endpoint, taken from the action schema
iconReactElementthe Task iconButton icon
labelReactNode—Button label; without one the button renders icon-only with a tooltip

How the dialog is mounted​

The button registers the dialog through useFormExtensions' registerFormExtension, so FormShell renders it inside the form element rather than in a portal — the dialog keeps full react-hook-form access to the fields it is about to fill. The registration is removed when the button unmounts.

caution

Outside a form — in a list toolbar, say — nothing renders the registry, so the dialog never mounts and the button does nothing. The AI assistant belongs on create and edit views.

See also​