#255: load plugins from CDN
This commit is contained in:
parent
6be67895dd
commit
c3cc63499c
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
import Plugin from "./Plugin";
|
import Plugin from "./Plugin";
|
||||||
import { register } from "./activation-manager";
|
import { register } from "./activation-manager";
|
||||||
import plugins from "../../../../web/public/plugins/plugin.json"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object.<string, any>} installOptions The {@link https://www.npmjs.com/package/pacote|pacote options}
|
* @typedef {Object.<string, any>} installOptions The {@link https://www.npmjs.com/package/pacote|pacote options}
|
||||||
@ -66,7 +65,11 @@ export async function getActive() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line no-undef
|
// 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(
|
return plgList.map(
|
||||||
(plugin) =>
|
(plugin) =>
|
||||||
new Plugin(
|
new Plugin(
|
||||||
|
|||||||
@ -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"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
Loading…
x
Reference in New Issue
Block a user