MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / updateStatusBarDisplay

Function updateStatusBarDisplay

src/components/lspStatusBar/index.js:128–162  ·  view source on GitHub ↗

* Update the status bar display

()

Source from the content-addressed store, hash-verified

126 * Update the status bar display
127 */
128function 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

Callers 3

showLspStatusFunction · 0.85
hideStatusFunction · 0.85
updateLspStatusFunction · 0.85

Calls 3

buildAggregatedStatusFunction · 0.85
hideStatusBarFunction · 0.85
removeMethod · 0.45

Tested by

no test coverage detected