SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
Fix agent data property access and zoom timing
samme-abdulf10ddc60dae9
diff --git a/packages/app/src/builder-ui/workspace/Workspace.class.ts b/packages/app/src/builder-ui/workspace/Workspace.class.tsindex a47d751e..aa99349d 100644--- a/packages/app/src/builder-ui/workspace/Workspace.class.ts+++ b/packages/app/src/builder-ui/workspace/Workspace.class.ts@@ -1599,7 +1599,7 @@ export class Workspace extends EventEmitter {.filter((c) => c);const debugSessionEnabled = this.domElement.classList.contains('debug-enabled');let auth = this.agent.data?.auth;- const variables = this.agent.data.variables;+ const variables = this.agent.data?.variables;let currentPan;let currentZoom;@@ -1643,12 +1643,12 @@ export class Workspace extends EventEmitter {connections,description: this.agent.description,shortDescription: this.agent.shortDescription,- behavior: this.agent.data.behavior,+ behavior: this.agent.data?.behavior,variables,debugSessionEnabled,auth,ui: { panzoom: { currentPan, currentZoom }, agentCard },- introMessage: this.agent.data.introMessage || '',+ introMessage: this.agent.data?.introMessage || '',};// Template Info@@ -1883,8 +1883,12 @@ export class Workspace extends EventEmitter {// it will always be triggered after initialization of the agent card since redraw() is an async operation (next tick)this.agentCard.addEventListener('AgentCardCreated', () => {this.scrollToAgentCard();- // For remixed templates, set a default zoom level to show more of the canvas after the agent card is created- setTimeout(() => this.zoomTo(0.5), 100);+ // For remixed templates only, set a default zoom level to show more of the canvas after the agent card is created+ if (isRemixedTemplate) {+ setTimeout(() => {+ this.zoomTo(0.5);+ }, 300);+ }});}