# AICommandDefinition

typedef

<a id="properties">

## Properties

<a id="member-id">

### `id: string`

The unique identifier of the command. It can be referenced while removing commands. See [`removeCommands`](module_ai_aiassistant_aiassistant-AIAssistantConfig.md#member-removeCommands) to learn more.

<a id="member-label">

### `label: string`

The human-readable label of the command.

<a id="member-order">

### `order?: number`

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](module_ai_aiassistant_aiassistant-AIAssistantConfig.md#member-commands).

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`).

<a id="member-prompt">

### `prompt: string`

The instruction that will be passed to the AI model.

It is wrapped in a "full prompt template" for better results.

<a id="member-requiresContent">

### `requiresContent?: boolean`

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`.

#### Value

`object`

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
