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
refactor: streamline option extraction in handleKeyValueModalForModal
Muhammad Hamza Khan95b5014b9204
diff --git a/packages/app/src/builder-ui/ui/form/fields/index.ts b/packages/app/src/builder-ui/ui/form/fields/index.tsindex 22de924b..8a2a4cd3 100644--- a/packages/app/src/builder-ui/ui/form/fields/index.ts+++ b/packages/app/src/builder-ui/ui/form/fields/index.ts@@ -237,9 +237,8 @@ export const createSelectBox = (template = `data-template="$1 ${_badge.replace(/\"/g, `'`)}"`;}- return `<option value="${_value}" ${- value == _value ? 'selected' : ''- } ${template}>${_text}</option>`;+ return `<option value="${_value}" ${value == _value ? 'selected' : ''+ } ${template}>${_text}</option>`;}).join('');@@ -406,19 +405,7 @@ async function handleKeyValueModalForModal(?.querySelector('textarea') as HTMLTextAreaElement;const fieldName = originalTextarea?.id || 'body';- // Extract options from the original button's onclick handler- const originalHandler = (originalButton as any).onclick;- let options = { title: 'Body', showVault: true, vaultScope: 'apiCall' }; // Default options-- // Try to extract options from the bound function- if (originalHandler && originalHandler.length > 1) {- // This is a bound function, try to extract the bound arguments- const handlerString = originalHandler.toString();- if (handlerString.includes('showVault')) {- // Extract options from the handler string or use defaults- options = { title: 'Body', showVault: true, vaultScope: 'apiCall' };- }- }+ const options = { title: 'Body', showVault: true, vaultScope: 'apiCall', dialogClasses: 'overflow-x-hidden' }; // Default options// Call the key/value modal handler directlyawait handleKvFieldEditBtn(fieldName, options);