Skip to content

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.

remove redraw as large names are now handled by css (#78)

ali-inkco5cfd1d3a3b96
diff --git a/packages/app/src/builder-ui/components/AgentCard.class.ts b/packages/app/src/builder-ui/components/AgentCard.class.ts
index 03c5e44d..a7cb84b8 100644
--- a/packages/app/src/builder-ui/components/AgentCard.class.ts
+++ b/packages/app/src/builder-ui/components/AgentCard.class.ts
@@ -166,37 +166,6 @@ export class AgentCard extends EventEmitter {
return Promise.resolve();
}
- /**
- * Refresh skill connections for the agent card
- * This method updates only the connections between the agent card and skills
- * without redrawing the entire card - useful when agent properties change
- */
- public async repaintSkillConnections(): Promise<void> {
- if (!this.workspace.agent?.data?.components) return;
-
- // Get skills once to avoid duplicate filtering
- const skills = this.workspace.agent.data.components.filter((c) => c.name === 'APIEndpoint');
- if (skills.length === 0) return;
-
- // Handle connections for all skills
- for (const skill of skills) {
- await this.handleCompConn(skill.id);
- }
-
- // Single repaint operation for all affected elements
- // This is more efficient than multiple individual repaints
- const elementsToRepaint = [
- this.domElement, // Agent card
- ...skills.map((skill) => document.querySelector(`#${skill.id}`)).filter(Boolean),
- ];
-
- elementsToRepaint.forEach((element) => {
- if (element) {
- this.workspace.jsPlumbInstance.repaint(element);
- }
- });
- }
-
/**
* Redraw the agent card
*/
@@ -675,10 +644,9 @@ export class AgentCard extends EventEmitter {
e.stopPropagation();
});
- this.workspace.addEventListener('AgentSaved', async () => {
+ this.workspace.addEventListener('AgentSaved', () => {
if (agentNameElement && this.workspace.agent?.data?.name != agentNameElement.textContent) {
agentNameElement.textContent = this.workspace.agent?.data?.name || '';
- await this.repaintSkillConnections();
}
// const topBarAgentAvatarElm: HTMLImageElement | null = document.querySelector('#agent-avatar');