AIReviewCustomCommand
An extra review command definition.
The command needs a prompt source, provided in one of three ways:
- an inline
promptstring - sent as the prompt, - a
contextreference - the referenced context drives the command (for example through a prompt it contains), - both - the inline
promptis used and thecontextis attached as additional reference material (for example a file).
The model property is optional. If not specified, the default model is used.
{
id: 'improve-captions',
label: 'Improve Captions',
description: 'Improve image captions in the document.',
prompt: 'Suggest improvements for the image captions in the document.'
}
The same command using a context reference instead of an inline prompt:
{
id: 'improve-captions',
label: 'Improve Captions',
description: 'Improve image captions in the document.',
context: { id: 'style-guide', promptId: 'improve-captions' }
}
An inline prompt combined with a context that attaches a single file as reference material:
{
id: 'improve-captions',
label: 'Improve Captions',
description: 'Improve image captions in the document.',
prompt: 'Suggest improvements for the image captions in the document.',
context: { id: 'style-guide', fileId: 'caption-examples' }
}
Properties
context : AIContextRef | undefinedreadonlymodule:ai/aireviewmode/aireviewmode~AIReviewCustomCommand#contextA context reference attached to the command.
When no inline
promptis provided, the referenced context drives the command (a whole context or apromptIdreference). When combined with an inlineprompt, it is attached as additional reference material (for example a single file).Experimental: This is a production-ready API but may change in minor releases without the standard deprecation policy. Check the changelog for migration guidance.
description : stringmodule:ai/aireviewmode/aireviewmode~AIReviewCustomCommand#descriptionid : stringmodule:ai/aireviewmode/aireviewmode~AIReviewCustomCommand#idlabel : stringmodule:ai/aireviewmode/aireviewmode~AIReviewCustomCommand#labelmodel : string | undefinedmodule:ai/aireviewmode/aireviewmode~AIReviewCustomCommand#modelprompt : string | undefinedreadonlymodule:ai/aireviewmode/aireviewmode~AIReviewCustomCommand#promptThe prompt to be sent to the AI model when the command is executed.
At least one prompt source is required: an inline
prompt, acontextthat carries a prompt (a whole context or apromptIdreference), or both. Acontextthat references only a single file (fileId) cannot drive the command on its own and must be combined with an inlineprompt.
Value
object