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

Method notifyNetworkState

static/js/utils.js:218–236  ·  view source on GitHub ↗
(message, type, throttleMs = 3000)

Source from the content-addressed store, hash-verified

216 }
217
218 notifyNetworkState(message, type, throttleMs = 3000) {
219 const now = Date.now();
220 if (
221 this._networkToastState.type === type &&
222 now - Number(this._networkToastState.at || 0) < throttleMs
223 ) {
224 return;
225 }
226 this._networkToastState = { type, at: now };
227 if (type === 'warning') {
228 toast.warning(message, 2500);
229 return;
230 }
231 if (type === 'success') {
232 toast.success(message, 1800);
233 return;
234 }
235 toast.info(message, 2000);
236 }
237
238 runWithConcurrency(task, priority = 'normal') {
239 return new Promise((resolve, reject) => {

Callers 2

setupNetworkListenersMethod · 0.95
runnerMethod · 0.95

Calls 3

warningMethod · 0.80
successMethod · 0.80
infoMethod · 0.80

Tested by

no test coverage detected