chore: add facades refactor: core module export refactor: inference plugin - deprecate function registering (#537) * refactor: revamp inference plugin as class - deprecate function registering * refactor: monitoring plugin - deprecate service registering (#538) refactor: revamp inference plugin as class - deprecate function registering chore: update import refactor: plugin revamp - model management chore: update build steps and remove experimental plugins refactor: remove pluggable electron chore: add sorting for conversations chore: build plugins for testing chore: consistent plugin directory name chore: docs chore: fix CI chore: update conversation prefix
24 lines
642 B
TypeScript
24 lines
642 B
TypeScript
import { EventEmitter } from './eventsService'
|
|
import * as cn from './cloudNativeService'
|
|
export const setupCoreServices = () => {
|
|
if (typeof window === 'undefined') {
|
|
console.log('undefine', window)
|
|
return
|
|
} else {
|
|
console.log('Setting up core services')
|
|
}
|
|
if (!window.corePlugin) {
|
|
window.corePlugin = {
|
|
events: new EventEmitter(),
|
|
}
|
|
window.coreAPI = {}
|
|
window.coreAPI = window.electronAPI ?? {
|
|
invokePluginFunc: cn.invokePluginFunc,
|
|
downloadFile: cn.downloadFile,
|
|
deleteFile: cn.deleteFile,
|
|
appVersion: cn.appVersion,
|
|
openExternalUrl: cn.openExternalUrl,
|
|
}
|
|
}
|
|
}
|