replace text-based autocomplete with vision-based endpoint

This commit is contained in:
CREDO23 2026-04-03 18:17:50 +02:00
parent ced7f7562a
commit aeb3f13f91
6 changed files with 102 additions and 133 deletions

View file

@ -26,8 +26,8 @@ contextBridge.exposeInMainWorld('electronAPI', {
requestAccessibility: () => ipcRenderer.invoke(IPC_CHANNELS.REQUEST_ACCESSIBILITY),
restartApp: () => ipcRenderer.invoke(IPC_CHANNELS.RESTART_APP),
// Autocomplete
onAutocompleteContext: (callback: (data: { text: string; cursorPosition: number; searchSpaceId?: string }) => void) => {
const listener = (_event: unknown, data: { text: string; cursorPosition: number; searchSpaceId?: string }) => callback(data);
onAutocompleteContext: (callback: (data: { screenshot: string; searchSpaceId?: string }) => void) => {
const listener = (_event: unknown, data: { screenshot: string; searchSpaceId?: string }) => callback(data);
ipcRenderer.on(IPC_CHANNELS.AUTOCOMPLETE_CONTEXT, listener);
return () => {
ipcRenderer.removeListener(IPC_CHANNELS.AUTOCOMPLETE_CONTEXT, listener);