AIQuickActionCustomActionDefinition
interface
A custom AI quick action definition.
An example of an action that inserts content in the editor. The model property is optional — if not specified, the default model (from ai.models.defaultModelId configuration or the first available model) will be used:
{
id: 'add-quote-from-famous-person',
label: 'Add a quote from a famous person',
prompt: 'Add a quote from a known person, which would make sense in the context of the selected text.',
type: 'action',
model: 'claude-4-6-sonnet'
}
Copy code
Properties
id : stringreadonlyinheritedmodule:ai/aiquickactions/aiquickactions~AIQuickActionCustomActionDefinition#idThe unique identifier of the action.
label : stringreadonlyinheritedmodule:ai/aiquickactions/aiquickactions~AIQuickActionCustomActionDefinition#labelThe human-readable label of the action.
model : string | undefinedreadonlyinheritedmodule:ai/aiquickactions/aiquickactions~AIQuickActionCustomActionDefinition#modelThe AI model to use for the action. For
'action'type, if not specified, the default model will be used. For'chat'type, if not specified, the model currently selected in the AI Chat will be used.prompt : stringreadonlyinheritedmodule:ai/aiquickactions/aiquickactions~AIQuickActionCustomActionDefinition#promptThe prompt to be sent to the AI model when the action is executed.
type : 'action'module:ai/aiquickactions/aiquickactions~AIQuickActionCustomActionDefinition#typeThe type of the action.