vcl-cxtextedit-dot-tcxcustomtexteditproperties.md
Allows you to modify the list of AI-powered commands available in the editor.
property OnGetAICommands: TdxOnGetAICommands read; write;
Handle the OnGetAICommands event to modify the list of AI-powered commands available in the editor and change the state of individual commands depending on specific conditions in your application. All required dependencies (dxAI and dxAI.Commands.Text units) are added automatically to the project if you implement an OnGetAICommands event handler.
In v25.2, we ship no AI provider interaction APIs for DevExpress VCL controls[1]. Until Embarcadero ships official AI-related SDK libraries, VCL developers can plug in third-party libraries or leverage their own implementation to support different AI providers. We also published a GitHub example with a custom TdxAIChatClient implementation for a popular open-source AI library.
The OnGetAICommands event occurs every time the context menu is about to appear in the editor.
Note
The OnGetAICommands event can occur only if an AI service provider is registered and AI user commands are initialized.
The following parameters are available within an OnGetAICommands event handler:
SenderProvides access to the editor (a supported TcxCustomTextEdit descendant instance) that raised the OnGetAICommands event.AAICommandsProvides access to a pre-populated collection of AI-powered commands available in the editor. Use this parameter to add, remove, rearrange, disable, or enable individual end-user AI commands.
Refer to the TdxOnGetAICommands procedural type description for detailed information on all parameters accessible within an OnGetAICommands event handler.
Footnotes
See Also
TdxRichEitControlBase.OnGetAICommands Event
TcxCustomTextEditProperties Class