MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / updateChatAppsButton

Function updateChatAppsButton

web/js/chat-apps-dialog.js:137–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135 * 根据当前连接状态更新按钮外观
136 */
137export function updateChatAppsButton() {
138 if (!openBtn) return;
139 const config = state.config;
140 const adapters = config?.adapters || {};
141 const hasAnyToken = hasConfiguredChatApp(adapters);
142
143 if (hasAnyToken) {
144 openBtn.classList.add("connected");
145 openBtn.querySelector(".action-btn-label").textContent = "Connected to Chat Apps";
146 } else {
147 openBtn.classList.remove("connected");
148 openBtn.querySelector(".action-btn-label").textContent = "Connect Chat Apps";
149 }
150}
151
152// --- Internal Helpers ---
153

Callers 2

initFunction · 0.90
handleSaveFunction · 0.85

Calls 1

hasConfiguredChatAppFunction · 0.85

Tested by

no test coverage detected