fix: 渐进加载 AgentRun 分页快照

This commit is contained in:
root
2026-07-16 07:50:02 +02:00
parent c3f6b0a08a
commit a3da2d51b1
10 changed files with 416 additions and 203 deletions
+7 -1
View File
@@ -72,6 +72,7 @@ import { handleWorkbenchDebugFakeSseHttp } from "./workbench-debug-fake-sse.ts";
import { handleWorkbenchKafkaSseDebugHttp } from "./workbench-kafka-sse-debug.ts";
import { handleWorkbenchLaunchHttp } from "./server-workbench-launch-http.ts";
import { handleAgentObserverHttp } from "./server-agent-observer-http.ts";
import { handleAgentObserverRunsHttp } from "./server-agent-observer-runs-http.ts";
import { startWorkbenchEmptySessionGc } from "./workbench-empty-session-gc.ts";
import { startHwlabKafkaEventBridge } from "./kafka-event-bridge.ts";
import { handleM3IoControlHttp } from "./server-m3-http.ts";
@@ -764,6 +765,11 @@ async function handleRestAdapter(request, response, url, options) {
return;
}
if (url.pathname === "/v1/agent-observer/runs") {
await handleAgentObserverRunsHttp(request, response, url, options);
return;
}
if (url.pathname === "/v1/workbench/launches") {
await handleWorkbenchLaunchHttp(request, response, options);
return;
@@ -1018,7 +1024,7 @@ function navIdForRestPath(pathname, method = "GET") {
if (pathname === "/v1/users/me/profile" || pathname === "/v1/users/me/password") return "system.settings";
if (pathname === "/v1/workbench/debug/fake-sse" || pathname.startsWith("/v1/workbench/debug/fake-sse/") || pathname === "/v1/workbench/debug/kafka-sse" || pathname.startsWith("/v1/workbench/debug/kafka-sse/")) return "workbench.debug";
if (pathname === "/v1/workbench/events" || pathname === "/v1/workbench/projection-events" || pathname === "/v1/workbench/launches" || pathname === "/v1/workbench/sessions" || pathname.startsWith("/v1/workbench/sessions/") || pathname.startsWith("/v1/workbench/turns/") || pathname.startsWith("/v1/workbench/traces/")) return "workbench.code";
if (pathname === "/v1/agent-observer/events") return "workbench.code";
if (pathname === "/v1/agent-observer/events" || pathname === "/v1/agent-observer/runs") return "workbench.code";
if (pathname === "/v1/agent/chat" || pathname === "/v1/agent/sessions" || pathname.startsWith("/v1/agent/sessions/") || pathname === "/v1/agent/chat/inspect" || pathname.startsWith("/v1/agent/chat/result/") || pathname.startsWith("/v1/agent/turns/") || pathname.startsWith("/v1/agent/traces/") || pathname === "/v1/agent/chat/cancel" || pathname === "/v1/agent/chat/steer") return "workbench.code";
if (pathname === "/v1/admin/provider-profiles" || pathname.startsWith("/v1/admin/provider-profiles/")) return "admin.providerProfiles";
if (pathname === "/v1/admin/secrets" || pathname.startsWith("/v1/admin/secrets/")) return "admin.secrets";