client side sketch updating properly with direct changes to the editor (#2283)

* client side sketch updating properly with direct changes to the editor

* try tweak
This commit is contained in:
Kurt Hutten
2024-05-02 20:53:57 +10:00
committed by GitHub
parent 2c1f53f0f0
commit cf830f9895
3 changed files with 45 additions and 4 deletions

View File

@ -21,7 +21,12 @@ import { LanguageServerClient } from 'editor/plugins/lsp'
import { Marked } from '@ts-stack/markdown'
import { posToOffset } from 'editor/plugins/lsp/util'
import { Program, ProgramMemory } from 'lang/wasm'
import { codeManager, editorManager, kclManager } from 'lib/singletons'
import {
codeManager,
editorManager,
kclManager,
sceneInfra,
} from 'lib/singletons'
import type { UnitLength } from 'wasm-lib/kcl/bindings/UnitLength'
import { UpdateUnitsResponse } from 'wasm-lib/kcl/bindings/UpdateUnitsResponse'
import { UpdateCanExecuteResponse } from 'wasm-lib/kcl/bindings/UpdateCanExecuteResponse'
@ -63,6 +68,7 @@ export class LanguageServerPlugin implements PluginValue {
if (this.viewUpdate) {
editorManager.handleOnViewUpdate(this.viewUpdate)
setTimeout(() => sceneInfra.modelingSend({ type: 'Rejig sketch' }))
}
} catch (e) {
console.error(e)