eddyter 1.3.59 → 1.3.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,44 @@
1
+ import { LexicalEditor, RangeSelection } from '../../../node_modules/lexical';
2
+ export type AIProvider = "chatgpt" | "claude" | "grok" | "gemini" | "deepseek";
3
+ export type AIStatus = "idle" | "loading" | "success" | "error";
4
+ export interface AIAgentConfig {
5
+ editor: LexicalEditor;
6
+ query: string;
7
+ model: AIProvider;
8
+ apiKey: string;
9
+ type?: string;
10
+ savedSelection?: RangeSelection | null;
11
+ onStatusChange?: (status: AIStatus) => void;
12
+ onLoadingChange?: (isLoading: boolean) => void;
13
+ onStreamStart?: () => void;
14
+ onInputClear?: () => void;
15
+ onError?: (message: string) => void;
16
+ onSuccess?: () => void;
17
+ }
18
+ export interface AITransformConfig {
19
+ editor: LexicalEditor;
20
+ selectedText: string;
21
+ transformationType: string;
22
+ apiKey?: string;
23
+ savedSelection?: any;
24
+ secondaryPrompt?: string;
25
+ onSuccess?: (message: string) => void;
26
+ onError?: (message: string) => void;
27
+ onLoadingChange?: (isLoading: boolean) => void;
28
+ }
29
+ /**
30
+ * Simple AI transformation for text operations (grammar, simplify, etc.)
31
+ * Uses streaming for real-time display
32
+ */
33
+ export declare function processAITransformation(config: AITransformConfig): Promise<void>;
34
+ /**
35
+ * Complete AI agent that handles everything:
36
+ * - Real-time markdown streaming with proper rendering
37
+ * - Editor updates
38
+ * - Final HTML conversion with images/tables
39
+ * - State management
40
+ * - Error handling
41
+ */
42
+ export declare function processAIRequest(config: AIAgentConfig & {
43
+ secondaryPrompt?: string;
44
+ }): Promise<void>;