fix(workbench): disable terminal turn diagnostic fetches (#2029)

This commit is contained in:
Lyon
2026-06-24 08:32:34 +08:00
committed by GitHub
parent 024ecf3032
commit 99589938a8
+3 -16
View File
@@ -1235,15 +1235,8 @@ function nonBlockingProjection(projection: ProjectionDiagnostic | null): Project
async function refreshTerminalTraceFromRest(traceId: string, reason: string): Promise<void> {
if (terminalRealtimeRefreshInFlight.has(traceId)) return;
terminalRealtimeRefreshInFlight.add(traceId);
try {
const result = await fetchWorkbenchTurnStatus(traceId);
if (!result.ok || !result.data) return;
applyTurnStatusSnapshot(traceId, result.data);
if (result.data.terminal === true || isTerminalMessageStatus(result.data.status)) completeTrace(traceId, result.data);
} finally {
terminalRealtimeRefreshInFlight.delete(traceId);
restartRealtime(reason);
}
terminalRealtimeRefreshInFlight.delete(traceId);
void reason;
}
function installRealtimeVisibilityHandler(): void {
@@ -1329,13 +1322,7 @@ function nonBlockingProjection(projection: ProjectionDiagnostic | null): Project
async function hydrateTerminalMessageDiagnostics(): Promise<void> {
const targets = messages.value.filter(messageNeedsTerminalDiagnostics).slice(-6);
await Promise.all(targets.map(async (message) => {
const traceId = firstNonEmptyString(message.traceId, message.runnerTrace?.traceId);
if (!traceId) return;
const result = await fetchWorkbenchTurnStatus(traceId);
if (!result.ok || !result.data) return;
applyTurnStatusSnapshot(traceId, result.data);
}));
void targets;
void hydrateTraceEvents(messages.value);
}