AICommandDefinition
Properties
-
id : string
module:ai/aiassistant~AICommandDefinition#id
The unique identifier of the command. It can be referenced while removing commands. See
removeCommands
to learn more. -
label : string
module:ai/aiassistant~AICommandDefinition#label
The human-readable label of the command.
-
order : number | undefined
module:ai/aiassistant~AICommandDefinition#order
The order of the command on the list. The lower the number, the higher the command is displayed on the list. If not specified, the position of this command will be determined by the order of configuration.
If a new command is added without
order
property, it will be added at the end of the group.The order uses zero-based numbering (the first command's order is
0
). -
prompt : string
module:ai/aiassistant~AICommandDefinition#prompt
The instruction that will be passed to the AI model.
It is wrapped in a "full prompt template" for better results.
-
requiresContent : boolean | undefined
module:ai/aiassistant~AICommandDefinition#requiresContent
By default, all commands require a selection for the assistant to work on. If the selection is collapsed, it automatically expands to the nearest block boundaries to provide the AI context.
Setting this to
false
allows the command to work on a collapsed selection and prevent selection expansion. This is helpful, for instance, for commands that generate content from scratch.Note: If not specified, the default is
true
.