diff --git a/core/src/api/index.ts b/core/src/api/index.ts index 58b94f38b..be1b06777 100644 --- a/core/src/api/index.ts +++ b/core/src/api/index.ts @@ -4,7 +4,6 @@ */ export enum AppRoute { appDataPath = 'appDataPath', - appVersion = 'appVersion', openExternalUrl = 'openExternalUrl', openAppDirectory = 'openAppDirectory', openFileExplore = 'openFileExplorer', diff --git a/core/src/node/extension/manager.ts b/core/src/node/extension/manager.ts index 618a5ed9f..3e52ac02d 100644 --- a/core/src/node/extension/manager.ts +++ b/core/src/node/extension/manager.ts @@ -47,7 +47,7 @@ export class ExtensionManager { const extensionsJson = join(extDir, "extensions.json"); if (!existsSync(extensionsJson)) - writeFileSync(extensionsJson, "{}", "utf-8"); + writeFileSync(extensionsJson, "{}"); this.extensionsPath = extDir; } catch (error) { diff --git a/core/src/node/extension/store.ts b/core/src/node/extension/store.ts index 2225479ca..84b1f9caf 100644 --- a/core/src/node/extension/store.ts +++ b/core/src/node/extension/store.ts @@ -84,7 +84,6 @@ export function persistExtensions() { writeFileSync( ExtensionManager.instance.getExtensionsFile(), JSON.stringify(persistData), - "utf-8" ); } diff --git a/electron/handlers/app.ts b/electron/handlers/app.ts index 2cbc13848..d0d9dae72 100644 --- a/electron/handlers/app.ts +++ b/electron/handlers/app.ts @@ -7,15 +7,6 @@ import { ExtensionManager, ModuleManager } from '@janhq/core/node' import { startServer, stopServer } from '@janhq/server' export function handleAppIPCs() { - /** - * Returns the version of the app. - * @param _event - The IPC event object. - * @returns The version of the app. - */ - ipcMain.handle(AppRoute.appVersion, async (_event) => { - return app.getVersion() - }) - /** * Handles the "openAppDirectory" IPC message by opening the app's user data directory. * The `shell.openPath` method is used to open the directory in the user's default file explorer. diff --git a/web/containers/Layout/BottomBar/index.tsx b/web/containers/Layout/BottomBar/index.tsx index 6fbac8bec..655ca2300 100644 --- a/web/containers/Layout/BottomBar/index.tsx +++ b/web/containers/Layout/BottomBar/index.tsx @@ -15,7 +15,6 @@ import { MainViewState } from '@/constants/screens' import { useActiveModel } from '@/hooks/useActiveModel' import { useDownloadState } from '@/hooks/useDownloadState' -import { useGetAppVersion } from '@/hooks/useGetAppVersion' import { useGetDownloadedModels } from '@/hooks/useGetDownloadedModels' import useGetSystemResources from '@/hooks/useGetSystemResources' import { useMainViewState } from '@/hooks/useMainViewState' @@ -24,7 +23,6 @@ const BottomBar = () => { const { activeModel, stateModel } = useActiveModel() const { ram, cpu } = useGetSystemResources() const progress = useAtomValue(appDownloadProgress) - const appVersion = useGetAppVersion() const { downloadedModels } = useGetDownloadedModels() const { setMainViewState } = useMainViewState() const { downloadStates } = useDownloadState() @@ -74,9 +72,8 @@ const BottomBar = () => {