UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

47 lines (46 loc) 1.54 kB
/** * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options */ import { type Editor, Plugin } from 'ckeditor5/src/core.js'; import { type AIActionsNames, AIConnector } from '../aicore/aiconnector.js'; import { Dialog } from 'ckeditor5/src/ui.js'; import { AIEditing } from '../aicore/aiediting.js'; import { AIBalloon } from '../aiballoon/aiballoon.js'; import { DocumentCompare } from 'ckeditor5-collaboration/src/collaboration-core.js'; export declare class AIActions extends Plugin { /** * @inheritDoc */ static get requires(): readonly [typeof AIConnector, typeof Dialog, typeof AIEditing, typeof AIBalloon, typeof DocumentCompare]; /** * @inheritDoc */ static get pluginName(): "AIActions"; /** * @inheritDoc */ static get isOfficialPlugin(): true; /** * @inheritDoc */ static get isPremiumPlugin(): true; /** * The busy state of the AI actions. * * It is set to `true` when there are AI response being streamed or rendered. * * @observable */ isBusy: boolean; constructor(editor: Editor); stopInteraction(): void; executeAction(action: AIActionDefinition, label: string, icon?: string): Promise<void>; private _createInteraction; } export type AIActionDefinition = { actionName?: AIActionsNames; args?: Record<string, string>; userMessage?: string; model?: string; };