|
1 | 1 | declare global { |
2 | 2 | interface Window { |
3 | 3 | electron: { |
4 | | - onShowMenu: (callback: (text: string) => void) => () => void; |
5 | | - replaceText: (text: string) => void; |
6 | | - closeMenu: () => void; |
7 | | - resizeWindow: (size: { width?: number; height?: number }) => void; |
8 | | - moveWindow: (delta: { x: number; y: number }) => void; |
9 | | - openSettings: () => void; |
10 | | - onShowSuggestion: (callback: (data: { context: string }) => void) => () => void; |
11 | | - acceptSuggestion: (text: string) => void; |
12 | | - dismissSuggestion: () => void; |
13 | | - getSuggestionMode: () => Promise<"hotkey" | "auto">; |
14 | | - setSuggestionMode: (mode: "hotkey" | "auto") => void; |
15 | | - getTextOutputMode: () => Promise<"paste" | "typewriter" | "typewriter-leetcode">; |
16 | | - setTextOutputMode: (mode: "paste" | "typewriter" | "typewriter-leetcode") => void; |
17 | | - toggleBrainPanel: () => void; |
18 | | - setBrainPanelCollapsed: (collapsed: boolean) => void; |
19 | | - onMemoryStored: (callback: (memory: string) => void) => () => void; |
20 | | - onCaptureStatusChanged: (callback: (enabled: boolean) => void) => () => void; |
21 | | - getContextCaptureEnabled: () => Promise<boolean>; |
22 | | - setContextCaptureEnabled: (enabled: boolean) => void; |
23 | | - onAnalyzeScreenshot: (callback: (data: { dataUrl: string; timestamp: string }) => void) => () => void; |
24 | | - captureScreen: () => Promise<string | null>; |
25 | | - openExternal: (url: string) => void; |
26 | | - notifyAnalysisComplete: (success: boolean) => void; |
| 4 | + onShowMenu: (callback: (text: string) => void) => () => void |
| 5 | + replaceText: (text: string) => void |
| 6 | + closeMenu: () => void |
| 7 | + resizeWindow: (size: { width?: number; height?: number }) => void |
| 8 | + moveWindow: (delta: { x: number; y: number }) => void |
| 9 | + openSettings: () => void |
| 10 | + onShowSuggestion: (callback: (data: { context: string }) => void) => () => void |
| 11 | + acceptSuggestion: (text: string) => void |
| 12 | + dismissSuggestion: () => void |
| 13 | + getSuggestionMode: () => Promise<'hotkey' | 'auto'> |
| 14 | + setSuggestionMode: (mode: 'hotkey' | 'auto') => void |
| 15 | + getTextOutputMode: () => Promise<'paste' | 'typewriter' | 'typewriter-leetcode'> |
| 16 | + setTextOutputMode: (mode: 'paste' | 'typewriter' | 'typewriter-leetcode') => void |
| 17 | + toggleBrainPanel: () => void |
| 18 | + setBrainPanelCollapsed: (collapsed: boolean) => void |
| 19 | + onMemoryStored: (callback: (memory: string) => void) => () => void |
| 20 | + onCaptureStatusChanged: (callback: (enabled: boolean) => void) => () => void |
| 21 | + getContextCaptureEnabled: () => Promise<boolean> |
| 22 | + setContextCaptureEnabled: (enabled: boolean) => void |
| 23 | + onAnalyzeScreenshot: ( |
| 24 | + callback: (data: { dataUrl: string; timestamp: string }) => void |
| 25 | + ) => () => void |
| 26 | + captureScreen: () => Promise<string | null> |
| 27 | + openExternal: (url: string) => void |
| 28 | + notifyAnalysisComplete: (success: boolean) => void |
27 | 29 | // Ghost Text Overlay |
28 | | - on: (channel: string, callback: (...args: unknown[]) => void) => void; |
29 | | - removeListener: (channel: string, callback: (...args: unknown[]) => void) => void; |
30 | | - getGhostTextEnabled: () => Promise<boolean>; |
31 | | - setGhostTextEnabled: (enabled: boolean) => void; |
| 30 | + on: (channel: string, callback: (...args: unknown[]) => void) => void |
| 31 | + removeListener: (channel: string, callback: (...args: unknown[]) => void) => void |
| 32 | + getGhostTextEnabled: () => Promise<boolean> |
| 33 | + setGhostTextEnabled: (enabled: boolean) => void |
32 | 34 | // Ghost Text Auto-Trigger |
33 | | - getGhostTextAutoTrigger: () => Promise<boolean>; |
34 | | - setGhostTextAutoTrigger: (enabled: boolean) => void; |
35 | | - getGhostTextAutoTriggerDelay: () => Promise<number>; |
36 | | - setGhostTextAutoTriggerDelay: (delayMs: number) => void; |
| 35 | + getGhostTextAutoTrigger: () => Promise<boolean> |
| 36 | + setGhostTextAutoTrigger: (enabled: boolean) => void |
| 37 | + getGhostTextAutoTriggerDelay: () => Promise<number> |
| 38 | + setGhostTextAutoTriggerDelay: (delayMs: number) => void |
37 | 39 | // User ID Persistence |
38 | | - setUserId: (userId: string) => void; |
39 | | - getUserId: () => Promise<string | null>; |
| 40 | + setUserId: (userId: string) => void |
| 41 | + getUserId: () => Promise<string | null> |
40 | 42 | // Cached Memories for Inline Suggestions |
41 | | - setCachedMemories: (memories: string[]) => void; |
42 | | - getCachedMemories: () => Promise<string[]>; |
| 43 | + setCachedMemories: (memories: string[]) => void |
| 44 | + getCachedMemories: () => Promise<string[]> |
43 | 45 | // Content Protection (Invisibility) |
44 | | - getContentProtectionEnabled: () => Promise<boolean>; |
45 | | - setContentProtectionEnabled: (enabled: boolean) => void; |
| 46 | + getContentProtectionEnabled: () => Promise<boolean> |
| 47 | + setContentProtectionEnabled: (enabled: boolean) => void |
46 | 48 | // Voice Agent Panel |
47 | | - onVoiceAgentStart: (callback: () => void) => () => void; |
48 | | - onVoiceAgentStop: (callback: () => void) => () => void; |
49 | | - onVoiceAgentState: (callback: (data: { state: string }) => void) => () => void; |
50 | | - onVoiceAgentReset: (callback: () => void) => () => void; |
51 | | - onVoiceAgentTranscript: (callback: (data: { role: string; text: string }) => void) => () => void; |
52 | | - voiceAgentSessionStarted: () => void; |
53 | | - voiceAgentSessionStopped: () => void; |
54 | | - voiceAgentStateChange: (state: string) => void; |
55 | | - voiceAgentHide: () => void; |
56 | | - getVoiceAgentActive: () => Promise<boolean>; |
| 49 | + onVoiceAgentStart: (callback: () => void) => () => void |
| 50 | + onVoiceAgentStop: (callback: () => void) => () => void |
| 51 | + onVoiceAgentState: (callback: (data: { state: string }) => void) => () => void |
| 52 | + onVoiceAgentReset: (callback: () => void) => () => void |
| 53 | + onVoiceAgentTranscript: ( |
| 54 | + callback: (data: { role: string; text: string }) => void |
| 55 | + ) => () => void |
| 56 | + voiceAgentSessionStarted: () => void |
| 57 | + voiceAgentSessionStopped: () => void |
| 58 | + voiceAgentStateChange: (state: string) => void |
| 59 | + voiceAgentHide: () => void |
| 60 | + getVoiceAgentActive: () => Promise<boolean> |
57 | 61 | // Transcribe Mode |
58 | | - onTranscribeStart: (callback: () => void) => () => void; |
59 | | - onTranscribeStop: (callback: () => void) => () => void; |
60 | | - onTranscribeState: (callback: (data: { state: string }) => void) => () => void; |
61 | | - onTranscribeAudioLevel: (callback: (data: { level: number }) => void) => () => void; |
62 | | - sendTranscribeAudio: (audioBase64: string) => void; |
63 | | - getTranscribeState: () => Promise<{ state: string }>; |
| 62 | + onTranscribeStart: (callback: () => void) => () => void |
| 63 | + onTranscribeStop: (callback: () => void) => () => void |
| 64 | + onTranscribeState: (callback: (data: { state: string }) => void) => () => void |
| 65 | + onTranscribeAudioLevel: (callback: (data: { level: number }) => void) => () => void |
| 66 | + sendTranscribeAudio: (audioBase64: string) => void |
| 67 | + getTranscribeState: () => Promise<{ state: string }> |
64 | 68 | // Model Settings |
65 | | - getDefaultModel: () => Promise<string>; |
66 | | - setDefaultModel: (model: string) => void; |
67 | | - getDefaultFastModel: () => Promise<string>; |
68 | | - setDefaultFastModel: (model: string) => void; |
| 69 | + getDefaultModel: () => Promise<string> |
| 70 | + setDefaultModel: (model: string) => void |
| 71 | + getDefaultFastModel: () => Promise<string> |
| 72 | + setDefaultFastModel: (model: string) => void |
69 | 73 | // Onboarding |
70 | | - getOnboardingComplete: () => Promise<boolean>; |
71 | | - setOnboardingComplete: (complete: boolean) => void; |
72 | | - }; |
| 74 | + getOnboardingComplete: () => Promise<boolean> |
| 75 | + setOnboardingComplete: (complete: boolean) => void |
| 76 | + } |
73 | 77 | } |
74 | 78 | } |
75 | 79 |
|
76 | | -export { }; |
77 | | - |
| 80 | +export {} |
0 commit comments