mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
replace text-based autocomplete with vision-based endpoint
This commit is contained in:
parent
ced7f7562a
commit
aeb3f13f91
6 changed files with 102 additions and 133 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue