diff --git a/src/App.tsx b/src/App.tsx index fa6227d..b79db5e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -134,8 +134,29 @@ type AiPromptTemplate = { openPreviewOnSuccess?: boolean; }; +type AiEditScope = "document" | "selection"; + +type AiSelection = { + from: number; + to: number; + text: string; +}; + type AiActionRequest = { template: AiPromptTemplate; + scope?: AiEditScope; + selection?: AiSelection | null; +}; + +type PendingAiScopeChoice = { + template: AiPromptTemplate | null; + selection: AiSelection; + isCustomPrompt: boolean; +}; + +type CustomPromptState = { + scope: AiEditScope; + selection: AiSelection | null; }; const DEFAULT_TITLE = "Untitled Text";