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
Enhance Debugging UI and Functionality
Muhammad Hamza Khan0ab5400b65f3
diff --git a/packages/app/src/builder-ui/components/Component.class/index.ts b/packages/app/src/builder-ui/components/Component.class/index.tsindex 8b4d9759..97ad97d3 100644--- a/packages/app/src/builder-ui/components/Component.class/index.ts+++ b/packages/app/src/builder-ui/components/Component.class/index.ts@@ -494,7 +494,19 @@ export class Component extends EventEmitter {`;debugBtn.appendChild(svgContainer);- debugBtn.onclick = this.openDebugDialog.bind(this);+ debugBtn.onclick = (event) => {+ // if the component is already active, step the component+ if (this.domElement.classList.contains('dbg-active')) {+ event.stopPropagation();+ event.stopImmediatePropagation();+ const stepBtn = document.getElementById('debug-menubtn-step');+ stepBtn && stepBtn.click();+ return;+ }++ // otherwise, open the debug dialog+ this.openDebugDialog(event);+ };new TooltipV2(debugBtn, {text: 'Run with Debug',diff --git a/packages/app/src/builder-ui/debugger.ts b/packages/app/src/builder-ui/debugger.tsindex 31b36d63..5559a1d3 100644--- a/packages/app/src/builder-ui/debugger.ts+++ b/packages/app/src/builder-ui/debugger.ts@@ -1511,6 +1511,11 @@ export async function processDebugStep(debugInfo, agentID, sessionID?, IDFilter?if (active) {componentElement.classList.add('dbg-active');activeComponentsInfo.push(componentElement);++ const debugBtn = componentElement.querySelector('.btn-debug');+ if (debugBtn) {+ debugBtn.setAttribute('data-tooltip', 'Debug Step');+ }}if (result.state[id].alwaysActive) componentElement.classList.add('dbg-always-active');@@ -3238,6 +3243,11 @@ function resetComponentsState({component.classList.remove('empty-input-style');$(component.querySelector('.cpt-overlay')).hide();+ const debugBtn = component.querySelector('.btn-debug');+ if (debugBtn) {+ debugBtn.setAttribute('data-tooltip', 'Run with Debug');+ }+if (resetMessages) {component['_control']?.clearComponentMessages();}diff --git a/packages/app/static/css/smyth-builder-override.css b/packages/app/static/css/smyth-builder-override.cssindex a4974ced..21ac3055 100644--- a/packages/app/static/css/smyth-builder-override.css+++ b/packages/app/static/css/smyth-builder-override.css@@ -911,6 +911,22 @@ code.language-plan.done::before {content: url("data:image/svg+xml,%3Csvg width='25' height='20' viewBox='0 0 25 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0.772727' y='0.272727' width='23.4545' height='19.4545' rx='4.09091' fill='%23F5F5F5'/%3E%3Crect x='0.772727' y='0.272727' width='23.4545' height='19.4545' rx='4.09091' stroke='%23E3E3E3' stroke-width='0.545455'/%3E%3Cpath d='M18.5 11.2792V10.5112H16.2383C16.1992 10.0712 16.1074 9.65719 15.9629 9.26919C15.8184 8.88119 15.6289 8.52719 15.3945 8.20719H17.293L18.1133 4.84719L17.3867 4.65519L16.707 7.43919H14.6562C14.6562 7.43119 14.6523 7.42519 14.6445 7.42119C14.6367 7.41719 14.6328 7.41519 14.6328 7.41519C14.6719 7.29519 14.7012 7.17319 14.7207 7.04919C14.7402 6.92519 14.75 6.79519 14.75 6.65919C14.75 6.02719 14.5312 5.48719 14.0938 5.03919C13.6562 4.59119 13.125 4.36719 12.5 4.36719C11.875 4.36719 11.3438 4.59119 10.9062 5.03919C10.4688 5.48719 10.25 6.02719 10.25 6.65919C10.25 6.79519 10.2598 6.92519 10.2793 7.04919C10.2988 7.17319 10.3281 7.29519 10.3672 7.41519C10.3672 7.41519 10.3633 7.41719 10.3555 7.42119C10.3477 7.42519 10.3438 7.43119 10.3438 7.43919H8.29297L7.61328 4.65519L6.88672 4.84719L7.70703 8.20719H9.60547C9.37109 8.52719 9.18164 8.88119 9.03711 9.26919C8.89258 9.65719 8.80078 10.0712 8.76172 10.5112H6.5V11.2792H8.76172C8.78516 11.5512 8.83008 11.8172 8.89648 12.0772C8.96289 12.3372 9.05078 12.5832 9.16016 12.8152H7.70703L6.88672 16.1752L7.61328 16.3672L8.29297 13.5832H9.60547C9.94922 14.0472 10.373 14.4172 10.877 14.6932C11.3809 14.9692 11.9219 15.1072 12.5 15.1072C13.0781 15.1072 13.6191 14.9692 14.123 14.6932C14.627 14.4172 15.0508 14.0472 15.3945 13.5832H16.707L17.3867 16.3672L18.1133 16.1752L17.293 12.8152H15.8398C15.9492 12.5832 16.0371 12.3372 16.1035 12.0772C16.1699 11.8172 16.2148 11.5512 16.2383 11.2792H18.5Z' fill='%23313131'/%3E%3C/svg%3E%0A");}+.debug-enabled.debugging .component.dbg-active .debug-icon-container .debug-icon.default-icon {+ content: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIiBmaWxsPSJub25lIj4KPHBhdGggZD0iTTAuNzU2MTA0IDEwTDkuNzU2MSAxMCIgc3Ryb2tlPSIjMzEzMTMxIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik02IDE1TDEwLjM1MzEgMTBMNiA1IiBzdHJva2U9IiMzMTMxMzEiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTE1Ljk3NjQgNy45MTUzNkMxNC43MjQzIDcuOTE1MzYgMTMuNzA5MiA4Ljg0ODEgMTMuNzA5MiA5Ljk5ODdDMTMuNzA5MiAxMS4xNDkzIDE0LjcyNDMgMTIuMDgyIDE1Ljk3NjQgMTIuMDgyQzE3LjIyODYgMTIuMDgyIDE4LjI0MzcgMTEuMTQ5MyAxOC4yNDM3IDkuOTk4N0MxOC4yNDM3IDguODQ4MSAxNy4yMjg2IDcuOTE1MzYgMTUuOTc2NCA3LjkxNTM2WiIgZmlsbD0iIzMxMzEzMSIgc3Ryb2tlPSIjMzEzMTMxIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+');+ border: 1px solid #e3e3e3 !important;+ border-radius: 6px;+ width: 30px !important;+ height: 30px !important;+ padding: 4px;+}++.debug-enabled.debugging+ .component.dbg-active+ .debug-icon-container+ .debug-icon.default-icon:hover {+ background: #f5f5f5 !important;+}+/* Warning border for empty inputs */.component.has-empty-inputs {border: 1px solid #bf6a02 !important;@@ -1098,7 +1114,7 @@ code.language-plan.done::before {resize: none !important;}-.smyth-dialog #expanded-textarea{+.smyth-dialog #expanded-textarea {max-height: none !important;}diff --git a/packages/app/static/css/smyth-debugger.css b/packages/app/static/css/smyth-debugger.cssindex 3f64283d..86cae653 100644--- a/packages/app/static/css/smyth-debugger.css+++ b/packages/app/static/css/smyth-debugger.css@@ -125,6 +125,12 @@cursor: not-allowed;}+.debug-enabled.debugging .component:not(.dbg-active) .btn-debug {+ opacity: 0.5;+ pointer-events: none;+ cursor: not-allowed;+}+.component .endpoint .dbg-output {display: none;}