remix desktop sanity check

pull/5100/head
STetsing 2 months ago
parent d37d67e392
commit ed197aa3c2
  1. 10
      apps/remix-ide/src/app/plugins/remixAIPlugin.tsx
  2. 5
      apps/remixdesktop/src/plugins/remixAIDektop.ts

@ -37,15 +37,7 @@ export class RemixAIPlugin extends Plugin {
}
onActivation(): void {
if (this.isOnDesktop) {
console.log('Activating RemixAIPlugin on desktop')
this.on(this.remixDesktopPluginName, 'activated', () => {
this.call("remixAI", 'initialize', null, null, null, false);
})
} else {
console.log('Activating RemixAIPlugin on browser')
this.initialize()
}
this.initialize(null, null, null, false)
}
async initialize(model1?:IModel, model2?:IModel, remoteModel?:IRemoteModel, useRemote?:boolean){

@ -40,12 +40,10 @@ class RemixAIDesktopPluginClient extends ElectronBasePluginClient {
desktopInferencer:InferenceManager | RemoteInferencer = null
constructor (webContentsId: number, profile: Profile){
console.log("loading the remix plugin client ........................")
super(webContentsId, profile)
}
async onActivation(): Promise<void> {
console.log("Activation", "loaded the remix plugin client application side")
this.onload(() => {
})
}
@ -57,16 +55,13 @@ class RemixAIDesktopPluginClient extends ElectronBasePluginClient {
async initializeModelBackend(local, generalModel?, completionModel?){
if (!local){
console.log('RemixAI remote enpoints')
this.desktopInferencer = new RemoteInferencer()
} else if (generalModel || completionModel){
if (!this.desktopInferencer){
console.log('RemixAI local enpoints')
this.desktopInferencer = InferenceManager.getInstance(this.modelCacheDir)
if (this.desktopInferencer instanceof InferenceManager && generalModel) await this.desktopInferencer.init(generalModel)
if (this.desktopInferencer instanceof InferenceManager && completionModel) await this.desktopInferencer.init(completionModel)
} else {
console.log('Inference model already initialized')
return false // do not set event listener twice
}
} else {

Loading…
Cancel
Save