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

Method constructor

static/js/utils.js:176–188  ·  view source on GitHub ↗
(baseUrl = '/api')

Source from the content-addressed store, hash-verified

174
175class ApiClient {
176 constructor(baseUrl = '/api') {
177 this.baseUrl = baseUrl;
178 this.inflightRequests = new Map();
179 this.activeRequestCount = 0;
180 this.maxConcurrentRequests = 6;
181 this.requestQueue = [];
182 this.networkOnline = typeof navigator === 'undefined' ? true : navigator.onLine !== false;
183 this._networkToastState = { type: '', at: 0 };
184 this.defaultTimeoutMs = 20000;
185 this.defaultRetryCount = 1;
186 this.defaultRetryDelayMs = 900;
187 this.setupNetworkListeners();
188 }
189
190 getAdaptiveTimeoutMs() {
191 const connection = navigator?.connection || navigator?.mozConnection || navigator?.webkitConnection;

Callers

nothing calls this directly

Calls 1

setupNetworkListenersMethod · 0.95

Tested by

no test coverage detected