NEWCKEditor AI on your premises: Hook your LLM and register MCP tools. Webinar coming soon!
Sign up (with export icon)

AIChatShortcutChatDefinition

Api-interface iconinterface

A shortcut that interacts with the AI Chat.

Example of a shortcut that executes an AI Chat prompt with Reasoning and Web Search features turned on:

{
	id: 'continue-writing',
	type: 'chat',
	label: 'Continue writing',
	prompt: 'Continue writing this document. Match the existing tone, vocabulary level, and formatting. ' +
		'Do not repeat or summarize earlier sections. Ensure logical flow and progression of ideas. ' +
		'Add approximately 3 paragraphs.',
	useReasoning: true,
	useWebSearch: true
}
Copy code

Example of a shortcut that runs in draft mode allowing the user to fine-tune the prompt before sending it:

	{
		id: 'rewrite-document',
		type: 'chat',
		label: 'Rewrite the document',
		prompt: `Rewrite the document below for the following audience:

Audience: [e.g. Product / Engineering /Leadership]
Primary concern: [e.g., escalations, integrations, customer sentiment]
Context: [e.g. Internal performance review]

Guidelines:

- Emphasize sections most relevant to this audience
- De-emphasize or condense less relevant details
- Adjust terminology to match how this team thinks and speaks
- Keep metrics accurate and unchanged

Tone: [e.g. Clear, practical, collaborative]`,
		useReasoning: true,
		draftMode: true
	},
Copy code

Properties

  • Chevron-right icon

    draftMode : boolean | undefined
    readonly

    When enabled, the shortcut will use draft mode, which means that the prompt will not be submitted immediately, instead the AI Chat input will be filled with the shortcut prompt. This gives the user ability to fine-tune the prompt, or fill in missing data, before sending it to the AI Chat.

    Defaults to false

  • Chevron-right icon

    icon : string | undefined
    readonlyinherited

    The icon of the shortcut in SVG string format.

    Learn more about setting the icon in the IconView API reference.

    Note: When not provided, a generic icon associated with the shortcut type will be used instead.

  • Chevron-right icon

    id : string
    readonlyinherited

    The unique identifier of the shortcut.

  • Chevron-right icon

    label : string
    readonlyinherited

    The human-readable label of the shortcut.

  • Chevron-right icon

    model : string | undefined
    readonly

    The ID of the model to be used for the AI Chat shortcut.

    See the integration guide to learn more about available models.

    Note: The used ID must be enabled in the config.ai.models.displayedModels.

    Note: When not provided, the default model will be used. See config.ai.models.defaultModelId to learn more.

  • Chevron-right icon

    prompt : string
    readonly

    The prompt to be sent to the AI Chat.

  • Chevron-right icon

    type : 'chat'

    The type of the shortcut.

  • Chevron-right icon

    useReasoning : boolean | undefined
    readonly

    When enabled, the shortcut will run in reasoning mode, which means the AI Chat will use the ability to think through problems, draw logical conclusions, and make sense of complex information.

    See the integration guide to learn more about models supporting reasoning.

    Defaults to false

  • Chevron-right icon

    useWebSearch : boolean | undefined
    readonly

    When enabled, the shortcut will run in web search mode, which means the AI Chat will access and retrieve real-time information from the internet.

    See the integration guide to learn more about models supporting web search.

    Defaults to false