upload attachments and custom feedback

This commit is contained in:
2026-02-26 04:50:54 +10:00
parent f9333626aa
commit ee09163a7d
15 changed files with 580 additions and 41 deletions

View File

@@ -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')