Skip to content

Self-hosted AI workspace.

Python

fix: use correct element IDs for privilege-gated button hiding (#3705)

Michael85c852bfac05
diff --git a/static/app.js b/static/app.js
index c75070bf2..e1ffcc612 100644
--- a/static/app.js
+++ b/static/app.js
@@ -1159,7 +1159,7 @@ function initializeEventListeners() {
if (!p.can_use_bash) {
const bashToggle = document.getElementById('bash-toggle');
if (bashToggle) bashToggle.closest('.chat-input-toggle')?.style.setProperty('display', 'none');
- const bashBtn = document.getElementById('tool-bash-btn');
+ const bashBtn = document.getElementById('bash-toggle-btn');
if (bashBtn) bashBtn.style.display = 'none';
}
// Hide document button
@@ -1176,11 +1176,7 @@ function initializeEventListeners() {
const resOverflow = document.getElementById('overflow-research-btn');
if (resOverflow) resOverflow.style.display = 'none';
}
- // Hide image generation options
- if (!p.can_generate_images) {
- const imgBtn = document.getElementById('tool-image-btn');
- if (imgBtn) imgBtn.style.display = 'none';
- }
+
}
})
.catch(() => {});