AIChatShortcutTranslateDefinition
A shortcut that interacts with the AI Translate.
Note: This shortcut type requires the AITranslate plugin to be loaded.
This type of shortcut can run the translation with any of the available languages. It can be one of the languages available by default, or a custom language defined by the integrator via the config.ai.translate.languages configuration option.
Example of a shortcut that opens the AI Translate mode:
{
id: 'open-translate',
label: 'Open translate',
type: 'translate'
}
Example of a shortcut that runs the translation to Spanish:
{
id: 'translate-to-spanish',
label: 'Translate this document to Spanish',
type: 'translate',
language: 'spanish'
}
Properties
icon : string | undefinedreadonlyinheritedmodule:ai/aichatshortcuts/aichatshortcuts~AIChatShortcutTranslateDefinition#iconThe icon of the shortcut in SVG string format.
Learn more about setting the icon in the
IconViewAPI reference.Note: When not provided, a generic icon associated with the shortcut type will be used instead.
id : stringreadonlyinheritedmodule:ai/aichatshortcuts/aichatshortcuts~AIChatShortcutTranslateDefinition#idThe unique identifier of the shortcut.
label : stringreadonlyinheritedmodule:ai/aichatshortcuts/aichatshortcuts~AIChatShortcutTranslateDefinition#labelThe human-readable label of the shortcut.
language : string | undefinedreadonlymodule:ai/aichatshortcuts/aichatshortcuts~AIChatShortcutTranslateDefinition#languageThe language to be used for the translation.
See
languagesfor the list of supported languages.Note: When not provided, the shortcut will switch the user interface to the AI Translate.
type : 'translate'module:ai/aichatshortcuts/aichatshortcuts~AIChatShortcutTranslateDefinition#typeThe type of the shortcut.