import type { EditorHost } from '@cbi-blocksuite/block-std'; import { type Doc } from '@cbi-blocksuite/store'; import type { AILogic } from '../logic.js'; export type ChatReactiveData = { history: ChatMessage[]; syncedDocs: EmbeddedDoc[]; value: string; currentRequest?: number; tempMessage?: string; }; export declare class AIChatLogic { private logic; private getHost; constructor(logic: AILogic, getHost: () => EditorHost); get loading(): boolean; get host(): EditorHost; reactiveData: ChatReactiveData; private requestId; startRequest(p: () => Promise): Promise; getSelectedText: () => Promise; selectTextForBackground: () => Promise; selectShapesForBackground: () => Promise; splitDoc: (doc: Doc) => Promise; embeddingDocs: (docList: Doc[]) => Promise; syncWorkspace: () => Promise; genAnswer: (text: string) => Promise; getBackground(): Promise<{ messages: ChatMessage[]; sources: BackgroundSource[]; }>; replaceSelectedContent(text: string): Promise; insertBelowSelectedContent(text: string): Promise; createAction(name: string, action: (input: string) => Promise> | AsyncIterable): (text?: string) => Promise; docSelectionActionList: AllAction[]; edgelessSelectionActionList: AllAction[]; } type Action = { type: 'action'; name: string; hide?: () => boolean; action: () => Promise; }; type ActionGroup = { type: 'group'; name: string; children: AllAction[]; }; export type AllAction = Action | ActionGroup; type MessageContent = { type: 'text'; text: string; } | { type: 'image_url'; image_url: { url: string; }; }; type BackgroundSource = { id: string; slice: string[]; }; export type ChatMessage = { role: 'user'; content: MessageContent[]; } | { role: 'system'; content: string; } | { role: 'assistant'; content: string; sources: BackgroundSource[]; }; export type EmbeddedDoc = { id: string; sections: { vector: number[]; text: string; }[]; }; export {}; //# sourceMappingURL=logic.d.ts.map