pass thru the kcl version (#5366)

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2025-02-12 15:55:34 -08:00
committed by GitHub
parent 59d0e079a1
commit 0874891dd0
7 changed files with 40 additions and 0 deletions

View File

@ -16,6 +16,7 @@ import {
clearSceneAndBustCache,
emptyExecState,
ExecState,
getKclVersion,
initPromise,
KclValue,
parse,
@ -74,6 +75,7 @@ export class KclManager {
private _hasErrors = false
private _switchedFiles = false
private _fileSettings: KclSettingsAnnotation = {}
private _kclVersion: string | undefined = undefined
engineCommandManager: EngineCommandManager
@ -118,6 +120,16 @@ export class KclManager {
return this._execState
}
// Get the kcl version from the wasm module
// and store it in the singleton
// so we don't waste time getting it multiple times
get kclVersion() {
if (this._kclVersion === undefined) {
this._kclVersion = getKclVersion()
}
return this._kclVersion
}
get errors() {
return this._errors
}