* Update the status bar display
()
| 126 | * Update the status bar display |
| 127 | */ |
| 128 | function updateStatusBarDisplay() { |
| 129 | const bar = $statusBar; |
| 130 | if (!bar) return; |
| 131 | |
| 132 | const { message, avgProgress, taskCount } = buildAggregatedStatus(); |
| 133 | |
| 134 | if (taskCount === 0) { |
| 135 | hideStatusBar(); |
| 136 | return; |
| 137 | } |
| 138 | |
| 139 | const $title = bar.querySelector(".lsp-status-title"); |
| 140 | const $message = bar.querySelector(".lsp-status-message"); |
| 141 | const $progressText = bar.querySelector(".lsp-status-progress-text"); |
| 142 | const $progressContainer = bar.querySelector(".lsp-status-progress"); |
| 143 | const $icon = bar.querySelector(".lsp-status-icon"); |
| 144 | |
| 145 | if ($title) $title.textContent = currentServerLabel || ""; |
| 146 | if ($message) $message.textContent = message; |
| 147 | |
| 148 | if (avgProgress !== null && $progressText && $progressContainer) { |
| 149 | $progressText.textContent = `${avgProgress}%`; |
| 150 | $progressContainer.style.display = ""; |
| 151 | } else if ($progressContainer) { |
| 152 | $progressContainer.style.display = "none"; |
| 153 | } |
| 154 | |
| 155 | // Show spinning icon while progress is active |
| 156 | if ($icon) { |
| 157 | $icon.className = "lsp-status-icon icon autorenew"; |
| 158 | } |
| 159 | |
| 160 | bar.className = "lsp-status info"; |
| 161 | bar.classList.remove("hiding"); |
| 162 | } |
| 163 | |
| 164 | /** |
| 165 | * Hide the status bar |
no test coverage detected