flat: 暂存
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
import { contextBridge, ipcRenderer } from "electron";
|
||||
import { electronAPI } from "@electron-toolkit/preload";
|
||||
|
||||
const electronAPI = {
|
||||
ipcRenderer: {
|
||||
invoke: (channel: string, ...args: any[]) => ipcRenderer.invoke(channel, ...args),
|
||||
on: (channel: string, listener: (...args: any[]) => void) => ipcRenderer.on(channel, listener),
|
||||
off: (channel: string, listener: (...args: any[]) => void) => ipcRenderer.off(channel, listener),
|
||||
send: (channel: string, ...args: any[]) => ipcRenderer.send(channel, ...args),
|
||||
removeAllListeners: (channel: string) => ipcRenderer.removeAllListeners(channel),
|
||||
}
|
||||
};
|
||||
|
||||
const api = {
|
||||
installOllama: () => ipcRenderer.invoke("install-ollama-and-model"),
|
||||
|
||||
Reference in New Issue
Block a user