MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / resetButtons

Function resetButtons

static/js/app.js:2176–2207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2174
2175// 重置按钮状态
2176function resetButtons() {
2177 elements.startBtn.disabled = false;
2178 elements.cancelBtn.disabled = isAutoMode;
2179 stopLogPolling();
2180 stopBatchPolling();
2181 if (!isAutoMode) {
2182 stopAutoRegistrationMonitor();
2183 }
2184 clearWebSocketReconnect();
2185 clearBatchWebSocketReconnect();
2186 currentTask = null;
2187 currentBatch = null;
2188 // 不要重置 isBatchMode,保持用户选择的模式
2189 // isBatchMode = false;
2190 // 重置完成标志
2191 taskCompleted = false;
2192 batchCompleted = false;
2193 // 重置最终状态标志
2194 taskFinalStatus = null;
2195 batchFinalStatus = null;
2196 // 清除活跃任务标识
2197 activeTaskUuid = null;
2198 activeBatchId = null;
2199 // 清除 sessionStorage 持久化状态
2200 if (!isAutoMode) {
2201 sessionStorage.removeItem('activeTask');
2202 }
2203 // 断开 WebSocket
2204 disconnectWebSocket();
2205 disconnectBatchWebSocket();
2206 // 注意:不重置 isOutlookBatchMode,因为用户可能想继续使用 Outlook 批量模式
2207}
2208
2209// HTML 转义
2210function escapeHtml(text) {

Callers 9

handleSingleRegistrationFunction · 0.85
connectWebSocketFunction · 0.85
handleBatchRegistrationFunction · 0.85
handleCancelTaskFunction · 0.85
startLogPollingFunction · 0.85
startBatchPollingFunction · 0.85
connectBatchWebSocketFunction · 0.85
startOutlookBatchPollingFunction · 0.85

Calls 7

stopLogPollingFunction · 0.85
stopBatchPollingFunction · 0.85
clearWebSocketReconnectFunction · 0.85
disconnectWebSocketFunction · 0.85
disconnectBatchWebSocketFunction · 0.85

Tested by

no test coverage detected