Chore: refactor code, hide plugin menu in web
This commit is contained in:
parent
a6bd417b86
commit
7a1f713229
@ -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: {
|
||||
|
||||
@ -132,8 +132,10 @@ function getModelById(modelId: string): Promise<any> {
|
||||
|
||||
function onStart() {
|
||||
store.createCollection("models", {});
|
||||
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
|
||||
export function init({ register }: { register: RegisterExtensionPoint }) {
|
||||
|
||||
@ -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')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user