diff --git a/electron/main/index.ts b/electron/main/index.ts index 7be34e69..1694487f 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -337,33 +337,14 @@ ipcMain.on("set-openai-api-key", (event, apiKey: string) => { throw new Error("API Key cannot be empty"); } store.set(StoreKeys.UserOpenAIAPIKey, apiKey); - registerLLMSessionHandlers(store); } catch (error) { console.error("Error setting openai api key", error); } - // if (fileWatcher) { - // fileWatcher.close(); - // } - - // if (win) { - // startWatchingDirectory(win, userDirectory); - // updateFileListForRenderer(win, userDirectory, markdownExtensions); - // } - // maybeRePopulateTable(dbTable, userDirectory, markdownExtensions); event.returnValue = "success"; }); ipcMain.on("get-openai-api-key", (event) => { const apiKey = store.get(StoreKeys.UserOpenAIAPIKey); - // if (fileWatcher) { - // fileWatcher.close(); - // } - - // if (win) { - // startWatchingDirectory(win, userDirectory); - // updateFileListForRenderer(win, userDirectory, markdownExtensions); - // } - // maybeRePopulateTable(dbTable, userDirectory, markdownExtensions); event.returnValue = apiKey; });