Update artifact graph only when no error

Maybe fixes #6297
This commit is contained in:
Pierre Jacquier
2025-05-19 13:29:34 -04:00
parent 49b78d726a
commit 42e09e8b5e

View File

@ -487,10 +487,10 @@ export class KclManager {
if (!errors.length) {
this.lastSuccessfulVariables = execState.variables
this.lastSuccessfulOperations = execState.operations
// updateArtifactGraph relies on updated executeState/variables
await this.updateArtifactGraph(execState.artifactGraph)
}
this.ast = structuredClone(ast)
// updateArtifactGraph relies on updated executeState/variables
await this.updateArtifactGraph(execState.artifactGraph)
if (!isInterrupted) {
this.singletons.sceneInfra.modelingSend({
type: 'code edit during sketch',