Ai.aiAssistant
configurationDefines the configuration options for the AI Assistant tool in the Grid.
ai.aiAssistant
ObjectTriggered when a command item from the Commands view is clicked. The panel bar dataItem of the selected item is available through the event argument.
Specifies whether the prompt outputs are HTML-encoded before being displayed. When set to false, ensure output is properly sanitized to prevent XSS attacks.
Default: true
ai.aiAssistant.messages
ObjectThe text messages displayed in the AI Assistant. Use this option to customize or localize the messages.
Triggered when an action button on an output card is clicked. This event is fired for both built-in and custom actions.
Event Data
e.command String
The command identifier of the clicked action.
e.outputId String
The unique identifier of the output associated with the action.
e.output String
The output text content associated with the action.
e.prompt String
The prompt text that was used to generate the output.
e.button jQuery
The jQuery element of the clicked button.
An array of action configurations for the output cards in the AI Assistant.
Default: ["copy", "retry"]
ai.aiAssistant.outputTemplate
FunctionA template function for customizing the display of output content in the AI Assistant.
An array of prompt outputs to display in the AI Assistant output view.
Triggered when the prompt view Generate output button is clicked. The prompt text is available through the event argument. Suitable to make a request to the AI service to receive an output. Use the addPromptOutput method to add the generated output to the promptOutputs collection.
The prompt, output, history, isRetry and response properties are available in the event argument. When the output is generated after clicking the retry button of an output, the isRetry property is true and the output property is the output content of the output card. The history property is an array of prompt outputs generated before the current output.
Triggered when a prompt request is cancelled, typically by clicking the stop generation button during streaming operations.
Event Data
e.output Object (optional)
The output object being generated when the cancellation occurred.
Triggered when the AI service response is received. The response data is available through the event argument. Triggered only when the serviceUrl option is set.
Event Data
e.output Object
The output object containing the AI service response data with the following properties:
output- The generated text content from the AI serviceprompt- The original prompt text that was sent to the AI serviceid- The unique identifier for the outputisRetry- Whether this is a retry operationactiveView- The index of the view to activate after adding the outputisLoading- Whether the output is in loading stateisStreaming- Whether the output is being streamed
e.prompt String
The original prompt text that was sent to the AI service.
e.outputId String
The unique identifier for the output.
e.response Object
The original response object.
e.isRetry Boolean
Whether this is a retry operation.
ai.aiAssistant.promptSuggestionItemTemplate
String|FunctionThe template of the prompt suggestion item in the AI Assistant.
Defines the suggestions for the AI Assistant tool. The suggestions are displayed in the AI Assistant tool.
Configuration options for the TextArea component used in the AI Assistant prompt view.
Controls whether the subtitle of the card in the output view displays a tooltip containing the full content of the subtitle.
Default: false
ai.aiAssistant.speechToText
Boolean|ObjectConfigures speech-to-text functionality for the AI Assistant prompt input.
Default: true
An array of toolbar items to display in the AI Assistant header toolbar.
ai.aiAssistant.views
ArrayAn array of view configurations for the AI Assistant.