chore: strip per-request DEBUG logs from chat path

Remove [DBG:STREAM] chunk/pipe/EOF instrumentation and [DBG:SSE] flush +
fetch success lines that spam the dev console every request. Keep the stream
stall watchdog and the fetch-error (✖) diagnostics.
This commit is contained in:
MUH. IQRAM BAHRING committed 2026-08-07 04:24:54 +08:00
1 parent ad43a267ac
commit 041e039793
4 files changed
+5 -33

No files matched your search

-5
View File
@@ -139,8 +139,6 @@ export class BaseExecutor {
try {
const bodyStr = JSON.stringify(transformedBody);
const fetchT0 = Date.now();
dbg("FETCH", `${this.provider.toUpperCase()} → ${url} | body=${bodyStr.length}B | connectTimeout=${timeoutMs}ms`);
const response = await proxyAwareFetch(url, {
method: "POST",
headers,
@@ -148,9 +146,6 @@ export class BaseExecutor {
signal: mergedSignal
}, proxyOptions);
clearTimeout(connectTimer);
const ct = response.headers?.get?.("content-type") || "";
const cl = response.headers?.get?.("content-length") || "?";
dbg("FETCH", `${this.provider.toUpperCase()} ← ${response.status} | ttft=${Date.now() - fetchT0}ms | ct=${ct} | cl=${cl}`);
if (await tryRetry(urlIndex, response.status, `status ${response.status}`, response)) { urlIndex--; continue; }
-5
View File
@@ -491,19 +491,14 @@ export class FreebuffExecutor extends BaseExecutor {
for (let attempt = 0; ; attempt++) {
const transformedBody = buildBody();
const bodyStr = JSON.stringify(transformedBody);
dbg("FETCH", `FREEBUFF → ${url} | body=${bodyStr.length}B`);
const connectCtrl = new AbortController();
const timeoutMs = this.config?.timeoutMs || FETCH_CONNECT_TIMEOUT_MS;
const connectTimer = setTimeout(() => connectCtrl.abort(new Error("fetch connect timeout")), timeoutMs);
const mergedSignal = signal ? AbortSignal.any([signal, connectCtrl.signal]) : connectCtrl.signal;
const fetchT0 = Date.now();
let response;
try {
response = await proxyAwareFetch(url, { method: "POST", headers, body: bodyStr, signal: mergedSignal }, proxyOptions);
const ct = response.headers?.get?.("content-type") || "";
const cl = response.headers?.get?.("content-length") || "?";
dbg("FETCH", `FREEBUFF ← ${response.status} | ttft=${Date.now() - fetchT0}ms | ct=${ct} | cl=${cl}`);
} catch (error) {
// A caller/stream abort (AbortError) is genuine — never retry it. A
// transient socket/TLS reset (same class as the run-registration