UNPKG

jodit-pro

Version:

PRO Version of Jodit Editor

56 lines (55 loc) 2.2 kB
import type { IDirection } from "../../../traits/resize/resize"; /** * Display mode for the AI Assistant interface * - 'dialog': Modal dialog overlay * - 'flight': Compact panel fixed at bottom of viewport (position: fixed) * - 'left': Fixed panel on the left side * - 'right': Fixed panel on the right side (default) * - 'top': Fixed panel at the top * - 'bottom': Fixed panel at the bottom */ export type AIAssistantDisplayMode = 'dialog' | 'flight' | IDirection; /** * API communication mode * - 'full': Send entire conversation history with each request * - 'incremental': Send only new message with parent message ID (OpenAI-style) */ export type AIAssistantAPIMode = 'full' | 'incremental'; /** * Permission scope for tool execution * - 'once': Permission valid for single execution * - 'conversation': Permission valid for current conversation * - 'forever': Permission saved permanently */ export type ToolPermissionScope = 'once' | 'conversation' | 'forever'; /** * Tool execution status */ export type ToolCallStatus = 'pending' | 'approved' | 'denied' | 'executing' | 'executed' | 'error'; /** * Message role in conversation */ export type MessageRole = 'user' | 'assistant' | 'system' | 'tool'; /** * Parameter type for tool definitions */ export type ToolParameterType = 'string' | 'number' | 'boolean' | 'object' | 'array'; /** * Theme mode for AI Assistant */ export type AIAssistantTheme = 'dark' | 'light' | 'parent'; /** * Storage type for conversation persistence (using Jodit Storage) * - 'indexedDB': IndexedDB storage (persistent, large capacity, async) * - 'localStorage': Browser localStorage (persistent, ~5-10MB capacity) * - 'sessionStorage': Browser sessionStorage (session only, ~5-10MB capacity) * - 'memory': In-memory storage (volatile, lost on page reload) */ export type AIAssistantStorageType = 'indexedDB' | 'localStorage' | 'sessionStorage' | 'memoryStorage'; /** * UI view state * - 'welcome': Initial screen (no conversations or new conversation) * - 'conversationList': List of existing conversations * - 'conversation': Active conversation view */ export type AIAssistantView = 'welcome' | 'conversationList' | 'conversation';