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 endpoint formatting and unsaved changes detection in APIEndpoint component
Muhammad Hamza Khan21ef0cb1bbe7
diff --git a/packages/app/src/builder-ui/components/APIEndpoint.class.ts b/packages/app/src/builder-ui/components/APIEndpoint.class.tsindex b79d34f6..dc4989e7 100644--- a/packages/app/src/builder-ui/components/APIEndpoint.class.ts+++ b/packages/app/src/builder-ui/components/APIEndpoint.class.ts@@ -422,11 +422,18 @@ export class APIEndpoint extends Component {// Ensure endpoint value is properly formattedif (settingsValues.endpoint) {// Format according to validation rules (trim and replace spaces with underscores)- this.data.endpoint = getValidEndpoint(settingsValues.endpoint);+ const formattedEndpoint = getValidEndpoint(settingsValues.endpoint);+ this.data.endpoint = formattedEndpoint;// Also update endpointLabel to matchthis.data.endpointLabel = this.data.endpoint;+ // Update the form field value to match the formatted value to prevent unsaved changes detection+ const endpointField = document.querySelector('input[name="endpoint"]') as HTMLInputElement;+ if (endpointField) {+ endpointField.value = formattedEndpoint;+ }+// Update endpointLabel to match the formatted endpoint valueconst endpointLabel = document.querySelector('div[name="endpointLabel"]',