From a1fc1784e1f7f908ab2147635f95ae3bab4a172e Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Thu, 26 Dec 2024 09:50:12 +0700 Subject: [PATCH] chore: update version env --- extensions/engine-management-extension/src/@types/global.d.ts | 2 +- extensions/engine-management-extension/src/index.ts | 3 +-- extensions/engine-management-extension/webpack.config.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/extensions/engine-management-extension/src/@types/global.d.ts b/extensions/engine-management-extension/src/@types/global.d.ts index c0793d51f6..0a8fa23bb6 100644 --- a/extensions/engine-management-extension/src/@types/global.d.ts +++ b/extensions/engine-management-extension/src/@types/global.d.ts @@ -1,7 +1,7 @@ export {} declare global { declare const API_URL: string - declare const NODE: string + declare const CORTEX_ENGINE_VERSION: string declare const SOCKET_URL: string interface Core { diff --git a/extensions/engine-management-extension/src/index.ts b/extensions/engine-management-extension/src/index.ts index 6813a6b0b1..3d8de47457 100644 --- a/extensions/engine-management-extension/src/index.ts +++ b/extensions/engine-management-extension/src/index.ts @@ -5,7 +5,6 @@ import { Engines, EngineVariant, EngineReleased, - systemInformation, } from '@janhq/core' import ky, { HTTPError } from 'ky' import PQueue from 'p-queue' @@ -28,7 +27,7 @@ export default class JSONEngineManagementExtension extends EngineManagementExten if (error instanceof HTTPError && error.response.status === 400) { await this.setDefaultEngineVariant(InferenceEngine.cortex_llamacpp, { variant: 'mac-arm64', - version: '0.1.42', + version: `${CORTEX_ENGINE_VERSION}`, }) } else { console.error('An unexpected error occurred:', error) diff --git a/extensions/engine-management-extension/webpack.config.js b/extensions/engine-management-extension/webpack.config.js index 20544d5db3..82499fb4bc 100644 --- a/extensions/engine-management-extension/webpack.config.js +++ b/extensions/engine-management-extension/webpack.config.js @@ -1,5 +1,4 @@ const webpack = require('webpack') -const packageJson = require('./package.json') module.exports = { experiments: { outputModule: true }, @@ -22,6 +21,7 @@ module.exports = { new webpack.DefinePlugin({ API_URL: JSON.stringify('http://127.0.0.1:39291'), SOCKET_URL: JSON.stringify('ws://127.0.0.1:39291'), + CORTEX_ENGINE_VERSION: JSON.stringify('v0.1.42'), }), ], resolve: {