diff --git a/electron/core/plugin-manager/execution/facade.js b/electron/core/plugin-manager/execution/facade.js index df09bd5aa..1059b743f 100644 --- a/electron/core/plugin-manager/execution/facade.js +++ b/electron/core/plugin-manager/execution/facade.js @@ -7,7 +7,6 @@ import Plugin from "./Plugin"; import { register } from "./activation-manager"; -import plugins from "../../../../web/public/plugins/plugin.json" /** * @typedef {Object.} installOptions The {@link https://www.npmjs.com/package/pacote|pacote options} @@ -66,7 +65,11 @@ export async function getActive() { return; } // eslint-disable-next-line no-undef - const plgList = await window.pluggableElectronIpc?.getActive() ?? plugins; + const plgList = await window.pluggableElectronIpc?.getActive() ?? + await import( + // eslint-disable-next-line no-undef + /* webpackIgnore: true */ PLUGIN_CATALOG + `?t=${Date.now()}` + ).then((data) => data.default.filter((e) => e.supportCloudNative)); return plgList.map( (plugin) => new Plugin( diff --git a/web/public/plugins/plugin.json b/web/public/plugins/plugin.json deleted file mode 100644 index 4ff946f88..000000000 --- a/web/public/plugins/plugin.json +++ /dev/null @@ -1,50 +0,0 @@ -[ - { - "active": true, - "name": "data-plugin", - "version": "1.0.0", - "activationPoints": [ - "init" - ], - "main": "dist/index.js", - "description": "Jan Database Plugin efficiently stores conversation and model data using SQLite, providing accessible data management", - "icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/circle-stack.svg", - "url": "/plugins/data-plugin/index.js" - }, - { - "active": true, - "name": "inference-plugin", - "version": "1.0.0", - "activationPoints": [ - "init" - ], - "main": "dist/index.js", - "description": "Inference Plugin, powered by @janhq/nitro, bring a high-performance Llama model inference in pure C++.", - "icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/command-line.svg", - "url": "/plugins/inference-plugin/index.js" - }, - { - "active": true, - "name": "model-management-plugin", - "version": "1.0.0", - "activationPoints": [ - "init" - ], - "main": "dist/index.js", - "description": "Model Management Plugin leverages the HuggingFace API for model exploration and seamless downloads", - "icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/queue-list.svg", - "url": "/plugins/model-management-plugin/index.js" - }, - { - "active": true, - "name": "monitoring-plugin", - "version": "1.0.0", - "activationPoints": [ - "init" - ], - "main": "dist/bundle.js", - "description": "Utilizing systeminformation, it provides essential System and OS information retrieval", - "icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/cpu-chip.svg", - "url": "/plugins/monitoring-plugin/index.js" - } - ] \ No newline at end of file