✨ upload attachments and custom feedback
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { contextBridge, ipcRenderer } from 'electron'
|
||||
import type { FileNode, AIPayload, RevisionMeta } from '../renderer/types/editor'
|
||||
import type { FileNode, AIPayload, RevisionMeta, Attachment } from '../renderer/types/editor'
|
||||
|
||||
contextBridge.exposeInMainWorld('api', {
|
||||
listFiles: (): Promise<FileNode[]> => ipcRenderer.invoke('fs:listFiles'),
|
||||
@@ -39,6 +39,9 @@ contextBridge.exposeInMainWorld('api', {
|
||||
})
|
||||
},
|
||||
|
||||
pickAttachments: (): Promise<Attachment[]> =>
|
||||
ipcRenderer.invoke('fs:pickAttachments'),
|
||||
|
||||
removeAIListener: (): void => {
|
||||
ipcRenderer.removeAllListeners('ai:chunk')
|
||||
ipcRenderer.removeAllListeners('ai:done')
|
||||
|
||||
Reference in New Issue
Block a user