UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

54 lines (53 loc) 1.2 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 */ /** * @module ai/aicore/model/aicontext */ /** * The type of context item. */ export declare enum AIContextItemType { FILE = "file", DOCUMENT = "document", URL = "web-resource", TEXT = "text", SELECTION = "selection" } /** * The type of text resource. */ export declare enum AIContextTextResourceType { TEXT = "text", MARKDOWN = "markdown", HTML = "html" } /** * A context item. */ export type AIContextItem = AIContextItemRequestData & { label: string; uiId: string; resourceId?: string; isReadOnly?: boolean; version?: number; hidden?: boolean; sessionId?: string | null; selection?: Array<{ start: number; end: number; }>; }; /** * A context item request data for using in the {@link module:ai/aicore/aiconnector~AIConnector}. */ export type AIContextItemRequestData = { type: AIContextItemType; content?: string; id?: string; selection?: Array<{ start: number; end: number; }>; };