@ -879,8 +879,7 @@ class EngineConnection extends EventTarget {
|
|||||||
.join('\n')
|
.join('\n')
|
||||||
if (message.request_id) {
|
if (message.request_id) {
|
||||||
const artifactThatFailed =
|
const artifactThatFailed =
|
||||||
this.engineCommandManager.artifactMap[message.request_id] ||
|
this.engineCommandManager.artifactMap[message.request_id]
|
||||||
this.engineCommandManager.lastArtifactMap[message.request_id]
|
|
||||||
console.error(
|
console.error(
|
||||||
`Error in response to request ${message.request_id}:\n${errorsString}
|
`Error in response to request ${message.request_id}:\n${errorsString}
|
||||||
failed cmd type was ${artifactThatFailed?.commandType}`
|
failed cmd type was ${artifactThatFailed?.commandType}`
|
||||||
@ -1183,13 +1182,6 @@ export class EngineCommandManager extends EventTarget {
|
|||||||
* of the KCL code that generated it.
|
* of the KCL code that generated it.
|
||||||
*/
|
*/
|
||||||
artifactMap: ArtifactMap = {}
|
artifactMap: ArtifactMap = {}
|
||||||
/**
|
|
||||||
* The {@link ArtifactMap} from the previous engine connection. This is used as a fallback
|
|
||||||
* when the engine connection is reset without a full client-side refresh.
|
|
||||||
*
|
|
||||||
* @deprecated This was used during a short time when we were choosing to not execute the engine in certain cases.
|
|
||||||
*/
|
|
||||||
lastArtifactMap: ArtifactMap = {}
|
|
||||||
/**
|
/**
|
||||||
* The client-side representation of the scene command artifacts that have been sent to the server;
|
* The client-side representation of the scene command artifacts that have been sent to the server;
|
||||||
* that is, the *non-modeling* commands and corresponding artifacts.
|
* that is, the *non-modeling* commands and corresponding artifacts.
|
||||||
@ -1593,10 +1585,7 @@ export class EngineCommandManager extends EventTarget {
|
|||||||
type: 'receive-reliable',
|
type: 'receive-reliable',
|
||||||
data: message,
|
data: message,
|
||||||
id,
|
id,
|
||||||
cmd_type:
|
cmd_type: command?.commandType || sceneCommand?.commandType,
|
||||||
command?.commandType ||
|
|
||||||
this.lastArtifactMap[id]?.commandType ||
|
|
||||||
sceneCommand?.commandType,
|
|
||||||
})
|
})
|
||||||
Object.values(this.subscriptions[modelingResponse.type] || {}).forEach(
|
Object.values(this.subscriptions[modelingResponse.type] || {}).forEach(
|
||||||
(callback) => callback(modelingResponse)
|
(callback) => callback(modelingResponse)
|
||||||
@ -1778,7 +1767,6 @@ export class EngineCommandManager extends EventTarget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
async startNewSession() {
|
async startNewSession() {
|
||||||
this.lastArtifactMap = this.artifactMap
|
|
||||||
this.artifactMap = {}
|
this.artifactMap = {}
|
||||||
await this.initPlanes()
|
await this.initPlanes()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user