/ src / main / aid / types.ts
types.ts
 1  export interface ShortcutCallbacks {
 2    prompt: () => void
 3    chat: () => void
 4    command: () => void
 5    readaloud: () => void
 6    transcribe: () => void
 7    scratchpad: () => void
 8    realtime: () => void
 9    studio: () => void
10  }
11  
12  export type Application = {
13    id: string
14    name: string
15    path: string
16    window: string
17  }
18  
19  export interface Automator {
20    getForemostApp(): Promise<Application | null>
21    selectAll(): Promise<void>
22    moveCaretBelow(): Promise<void>
23    copySelectedText(): Promise<void>
24    deleteSelectedText(): Promise<void>
25    pasteText(): Promise<void>
26  }
27  
28  export type CommandAction = 'default' | 'copy' | 'insert' | 'replace'
29  
30  export type Command = {
31    id: string
32    type: 'system' | 'user'
33    icon: string
34    label?: string
35    action: 'chat_window' | 'paste_below' | 'paste_in_place' | 'clipboard_copy'
36    template?: string
37    shortcut: string
38    state: 'enabled' | 'disabled' | 'deleted'
39    engine: string
40    model: string
41  }
42  
43  export type RunCommandParams = {
44    textId: string
45    sourceApp: Application | null
46    command: Command
47    action: CommandAction
48  }