主进程实现对 VSCode 和 JetBrains 项目的基本查找

This commit is contained in:
2026-03-27 22:49:27 +08:00
parent c714f554ac
commit e568a2dfaa
10 changed files with 251 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
import { ElectronAPI } from '@electron-toolkit/preload'
import { settingsDto, checkIDEsResultDto } from '@my-type/settings'
import { checkIDEsVersionDto } from "../my-type/settings";
import { IdeProjectsDto } from "../my-type/ide-projects";
// 此处只有签名
@@ -18,6 +19,8 @@ declare global {
_checkIDEs: () => Promise<checkIDEsResultDto>
_getIDEsVersion: () => Promise<checkIDEsVersionDto>
_checkIDEsVersion: () => Promise<checkIDEsVersionDto>
_getVSCodeProjects: () => Promise<IdeProjectsDto>
_getJetBrainsProjects: () => Promise<IdeProjectsDto>
}
}
}

View File

@@ -15,7 +15,9 @@ const codeLaunchpadApi = {
_getIDEs: () => ipcRenderer.invoke('codeLaunchpad:getIDEs'),
_checkIDEs: () => ipcRenderer.invoke('codeLaunchpad:checkIDEs'),
_getIDEsVersion: () => ipcRenderer.invoke('codeLaunchpad:getIDEsVersion'),
_checkIDEsVersion: () => ipcRenderer.invoke('codeLaunchpad:checkIDEsVersion')
_checkIDEsVersion: () => ipcRenderer.invoke('codeLaunchpad:checkIDEsVersion'),
_getVSCodeProjects: () => ipcRenderer.invoke('codeLaunchpad:getVSCodeProjects'),
_getJetBrainsProjects: () => ipcRenderer.invoke('codeLaunchpad:getJetBrainsProjects')
}
// Use `contextBridge` APIs to expose Electron APIs to