* fix: move tensorrt executable to engine Signed-off-by: James <james@jan.ai> * some update Signed-off-by: hiro <hiro@jan.ai> * chore: bump tensorrt version * fix: wrong destroy path * fix: install extensions in parallel * chore: update path for tensorrt engine (#2404) Signed-off-by: James <james@jan.ai> Co-authored-by: James <james@jan.ai> --------- Signed-off-by: James <james@jan.ai> Signed-off-by: hiro <hiro@jan.ai> Co-authored-by: James <james@jan.ai> Co-authored-by: hiro <hiro@jan.ai> Co-authored-by: Louis <louis@jan.ai>
37 lines
834 B
TypeScript
37 lines
834 B
TypeScript
import {
|
|
ExtensionTypeEnum,
|
|
MonitoringExtension,
|
|
SystemInformation,
|
|
} from '@janhq/core'
|
|
|
|
import { toaster } from '@/containers/Toast'
|
|
|
|
import { extensionManager } from '@/extension'
|
|
|
|
export const appService = {
|
|
systemInformation: async (): Promise<SystemInformation | undefined> => {
|
|
const monitorExtension = extensionManager?.get<MonitoringExtension>(
|
|
ExtensionTypeEnum.SystemMonitoring
|
|
)
|
|
if (!monitorExtension) {
|
|
console.warn('System monitoring extension not found')
|
|
return undefined
|
|
}
|
|
|
|
const gpuSetting = await monitorExtension.getGpuSetting()
|
|
const osInfo = await monitorExtension.getOsInfo()
|
|
|
|
return {
|
|
gpuSetting,
|
|
osInfo,
|
|
}
|
|
},
|
|
|
|
showToast: (title: string, description: string) => {
|
|
toaster({
|
|
title,
|
|
description: description,
|
|
})
|
|
},
|
|
}
|