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.

default sidebar should remain weaver for agents

ali-inkco9f83909240dc
diff --git a/packages/app/views/pages/builder.ejs b/packages/app/views/pages/builder.ejs
index 1dba33ec..119ca779 100644
--- a/packages/app/views/pages/builder.ejs
+++ b/packages/app/views/pages/builder.ejs
@@ -209,9 +209,9 @@
localStorage.setItem('sidebarOpen', true);
}
- const storedTab = localStorage.getItem(`${agentId}-currentSidebarTab`);
+ // Always use default tab (weaver or component) instead of restoring from localStorage
const defaultTab = isWeaverEnabled ? 'agentBuilderTab' : 'buildTab';
- const currentTab = hasAgentId ? storedTab || defaultTab : defaultTab;
+ const currentTab = defaultTab;
const storedMenuItem = currentTab ? menuItems.find((item) => item.tab === currentTab) : null;
return {
diff --git a/packages/app/views/pages/partials/studio/left-sidebar.ejs b/packages/app/views/pages/partials/studio/left-sidebar.ejs
index 9f367453..77c4f478 100644
--- a/packages/app/views/pages/partials/studio/left-sidebar.ejs
+++ b/packages/app/views/pages/partials/studio/left-sidebar.ejs
@@ -685,22 +685,23 @@
this.isSidebarOpen =
(storedValue !== null ? storedValue === 'true' : true) || isChatPresent;
- // Initialize currentSidebarTab properly
- this.currentSidebarTab = localStorage.getItem('currentSidebarTab');
- console.log('currentSidebarTab', this.currentSidebarTab);
+ // Always use default tab (weaver or component) instead of restoring from localStorage
+ // Check if weaver is enabled (same logic as builder.ejs - weaver is always enabled)
+ const isWeaverEnabled = true; // Weaver is always enabled (same as builder.ejs)
+ const defaultTab = isWeaverEnabled ? 'agentBuilderTab' : 'buildTab';
+
+ // Always set to default tab when sidebar is open
+ if (this.isSidebarOpen) {
+ this.currentSidebarTab = defaultTab;
+ localStorage.setItem('currentSidebarTab', defaultTab);
+ } else {
+ this.currentSidebarTab = null;
+ }
+
+ // Initialize previousTab (but don't restore currentSidebarTab from localStorage)
this.previousTab = localStorage.getItem('previousTab');
- console.log('previousTab', this.previousTab);
-
- // Convert "null" strings to actual null values
- if (this.currentSidebarTab === 'null') this.currentSidebarTab = null;
if (this.previousTab === 'null') this.previousTab = null;
- // Set default tab to Agent Weaver if sidebar is open and no tab is selected
- if (this.isSidebarOpen && !this.currentSidebarTab) {
- this.currentSidebarTab = 'agentBuilderTab';
- localStorage.setItem('currentSidebarTab', 'agentBuilderTab');
- }
-
// === SINGLE SOURCE OF TRUTH: Apply width to DOM ===
const applyWidth = (width) => {
this.$nextTick(() => {