diff --git a/plugins/inference-plugin/webpack.config.js b/plugins/inference-plugin/webpack.config.js index 13f692e10..0f5f59d7f 100644 --- a/plugins/inference-plugin/webpack.config.js +++ b/plugins/inference-plugin/webpack.config.js @@ -19,7 +19,7 @@ module.exports = { new webpack.DefinePlugin({ PLUGIN_NAME: JSON.stringify(packageJson.name), MODULE_PATH: JSON.stringify(`${packageJson.name}/${packageJson.module}`), - INFERENCE_URL: JSON.stringify("http://127.0.0.1:3928/inferences/llamacpp/chat_completion"), + INFERENCE_URL: JSON.stringify(process.env.INFERENCE_URL || "http://127.0.0.1:3928/inferences/llamacpp/chat_completion"), }), ], output: { diff --git a/plugins/model-management-plugin/index.ts b/plugins/model-management-plugin/index.ts index 43348b086..b0fee7630 100644 --- a/plugins/model-management-plugin/index.ts +++ b/plugins/model-management-plugin/index.ts @@ -132,7 +132,9 @@ function getModelById(modelId: string): Promise { function onStart() { store.createCollection("models", {}); - fetchDownloadProgress(null, null).then((fileName: string) => fileName && checkDownloadProgress(fileName)); + if (!(window as any)?.electronAPI) { + fetchDownloadProgress(null, null).then((fileName: string) => fileName && checkDownloadProgress(fileName)); + } } // Register all the above functions and objects with the relevant extension points diff --git a/web/screens/Settings/index.tsx b/web/screens/Settings/index.tsx index 0d6591071..2368eec20 100644 --- a/web/screens/Settings/index.tsx +++ b/web/screens/Settings/index.tsx @@ -18,7 +18,11 @@ import { extensionPoints, } from '@/../../electron/core/plugin-manager/execution/index' -const staticMenu = ['Appearance', 'Core Plugins'] +const staticMenu = ['Appearance'] + +if (typeof window !== "undefined" && window.electronAPI) { + staticMenu.push('Core Plugins'); +} const SettingsScreen = () => { const [activeStaticMenu, setActiveStaticMenu] = useState('Appearance')