HelpBot Assistant

How can I help you?

InlineAIAssistComponent

16 Mar 20265 minutes to read

Represents the Essential JS 2 Angular InlineAIAssist Component.

<ejs-inlineaiassist></ejs-inlineaiassist>

Properties

commandSettings CommandSettingsModel

Specifies the configuration for available AI commands and suggestions.
Specifies options such as enabling/disabling commands and customizing suggestion behavior.

Defaults to null

cssClass string

Specifies one or more custom CSS class names for the root element of the component.
Specifies multiple classes as a space-separated list.

Defaults to ’’

editorTemplate string|object

Specifies a custom template (string or function) for rendering the prompt input area.
Specifies a string template or a function that returns the editor UI markup.

Defaults to ’’

enablePersistence boolean

Enable or disable persisting component’s state between page reloads.

Defaults to false

enableRtl boolean

Specifies whether right-to-left (RTL) text direction is enabled for the component.
Specifies true to render UI elements and text in RTL layout.

Defaults to false

enableStreaming boolean

Specifies whether the prompt response need to be added through streaming in the component.
By default the response is not streamed and default value is false

Defaults to false

inlineToolbarSettings InlineToolbarSettingsModel

Specifies the configuration for the toolbar displayed in the inline prompt input.
Specifies buttons, shortcuts, and behaviors available while composing the prompt.

Defaults to null

locale string

Specifies the locale code used for UI text localization.
Specifies culture codes such as ‘en-US’ or ‘ta-IN’.

Defaults to ‘en-US’

placeholder string

Specifies the placeholder text displayed when the prompt input is empty.
Specifies helper text to guide the user on what to ask or generate.

Defaults to ‘Ask or generate AI content..’

popupHeight string|number

Specifies the height of the popup container.
Specifies a value in CSS units (px, %, rem, vh, etc.) or a number in pixels.

Defaults to ‘auto’

popupWidth string|number

Specifies the width of the popup container.
Specifies a value in CSS units (px, %, rem, vw, etc.) or a number in pixels.

Defaults to ‘400px’

prompt string

Specifies the current text value of the prompt input field.
Specifies the content that will be used to generate the AI response.

Defaults to ’’

prompts PromptResponseModel[]

Specifies the collection of prompts and their corresponding responses.
Specifies an array of PromptModel objects used to render the history.

Defaults to []

relateTo string|HTMLElement

Specifies the element relative to which the InlineAIAssist popup is positioned.
Accepts a CSS selector string (e.g., ‘#id’ or ‘.class’) or an HTMLElement.

Defaults to ’’

responseMode ResponseMode|string

Specifies how the AI response is displayed.
‘Inline’ renders at the caret position; ‘Popup’ shows above the prompt.

Defaults to ResponseMode.Popup

responseSettings ResponseSettingsModel

Specifies the configuration for the toolbar displayed with the generated response.
Specifies buttons, actions, and behaviors applied to the response area.

Defaults to null

responseTemplate string|object

Specifies a custom template (string or function) for rendering AI-generated response content.
Specifies that a function receives a ResponseTemplateContext and returns markup or text.

Defaults to ’’

target string|HTMLElement

Specifies the element or CSS selector where the InlineAIAssist will be appended.
Accepts either a CSS selector string (e.g., ‘.container’ or ‘#id’) or an HTMLElement.
Defaults to document.body.

Defaults to ‘body’

zIndex number

Specifies the z-index value applied to the popup or overlay layer.
Specifies a higher value to ensure the component appears above surrounding UI.

Defaults to 1000

Methods

addResponse

Appends or sets the generated response content in the component.
Use this method to manually inject a response from cache, non-streaming APIs, or custom logic.

Parameter Type Description
response string The response content (plain text or Markdown) to render.
isFinalUpdate (optional) boolean Indicates whether this response is the final one, to hide the stop response button.

Returns void

executePrompt

Executes the specified prompt as if the user typed and submitted it.
TUse this to run predefined commands, slash-menu actions, or external triggers.

Parameter Type Description
prompt string The prompt text to execute; dispatched to the AI backend or via the promptRequest event.

Returns void

hideCommandPopup

Hides the command popup displayed below the prompt input area.
Call this to dismiss the command chooser without selection.

Returns void

hidePopup

Closes/hides the popup UI or collapses the inline response area.
Triggers the close event after the popup is hidden.

Returns void

showCommandPopup

Opens the command popup below the prompt input area.
Use to display available commands or suggestions for quick selection.

Returns void

showPopup

Opens the popup UI and optionally positions it at the given screen coordinates.
When not provided, default positioning (caret/selection/target) is applied.

Returns void

Events

close EmitType<CloseEventArgs>

Triggers when the popup or inline response area is closed or hidden.
Occurs on cancel, Escape key, outside click, or after response insertion.

created EmitType<Object>

Event triggers when the component is created.

open EmitType<OpenEventArgs>

Triggers when the popup or inline response area becomes visible.
Use this event to set focus, measure layout, or run analytics.

promptRequest EmitType<InlinePromptRequestEventArgs>

Triggers when the user submits a prompt by pressing Enter or clicking Generate.
Use this event to perform the AI request, update UI, or cancel the default processing.