flat: 暂存

This commit is contained in:
Apcallover
2025-11-16 18:11:30 +08:00
parent 120bad4abe
commit e9c90d759b
18 changed files with 9912 additions and 8113 deletions

View File

@@ -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"),