fix(ui): render session-scoped tool events (#83734) · openclaw/openclaw@583a60f
TurboTheTurt
·
2026-05-19
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -48,6 +48,7 @@ Docs: https://docs.openclaw.ai
|
48 | 48 | ### Fixes |
49 | 49 | |
50 | 50 | - Agents/subagents: keep collect-mode announce queues batching unresolved-origin items with compatible same-route messages and resume collection after a true cross-channel drain when a later compatible batch remains. Fixes #83577. |
| 51 | +- Control UI: render live tool progress from session-scoped `session.tool` Gateway events so externally started runs show their tool cards in the active session. (#83734) Thanks @TurboTheTurtle. |
51 | 52 | - Browser: enforce current-tab URL allowlist checks for `/act` evaluate/batch actions and `/highlight` routes while leaving tab-management actions unblocked. (#78523) |
52 | 53 | - CI: require real-behavior-proof verdict markers to come from the ClawSweeper GitHub App before accepting exact-head proof. (#83692) |
53 | 54 | - Models: show the effective OpenAI/Codex auth profile in `/models` provider headers instead of falling back to the OpenAI env-key label. (#83697) Thanks @yu-xin-c. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -936,6 +936,39 @@ describe("connectGateway", () => {
|
936 | 936 | expect(loadChatHistoryMock).not.toHaveBeenCalled(); |
937 | 937 | }); |
938 | 938 | |
| 939 | +it("renders session-scoped tool events for externally started runs", () => { |
| 940 | +const { host, client } = connectHostGateway(); |
| 941 | + |
| 942 | +client.emitEvent({ |
| 943 | +event: "session.tool", |
| 944 | +payload: { |
| 945 | +runId: "external-run-1", |
| 946 | +seq: 1, |
| 947 | +stream: "tool", |
| 948 | +ts: 123, |
| 949 | +sessionKey: "main", |
| 950 | +data: { |
| 951 | +toolCallId: "session-tool-1", |
| 952 | +name: "exec", |
| 953 | +phase: "start", |
| 954 | +args: { command: "pwd" }, |
| 955 | +}, |
| 956 | +}, |
| 957 | +}); |
| 958 | + |
| 959 | +expect(host.toolStreamOrder).toStrictEqual(["session-tool-1"]); |
| 960 | +const entry = host.toolStreamById.get("session-tool-1") as |
| 961 | +| { args?: unknown; name?: string; runId?: string; sessionKey?: string } |
| 962 | +| undefined; |
| 963 | +expect(entry).toMatchObject({ |
| 964 | +args: { command: "pwd" }, |
| 965 | +name: "exec", |
| 966 | +runId: "external-run-1", |
| 967 | +sessionKey: "main", |
| 968 | +}); |
| 969 | +expect(loadChatHistoryMock).not.toHaveBeenCalled(); |
| 970 | +}); |
| 971 | + |
939 | 972 | it("stores BTW side results for the active session", () => { |
940 | 973 | const { host, client } = connectHostGateway(); |
941 | 974 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -860,7 +860,7 @@ function handleGatewayEventUnsafe(host: GatewayHost, evt: GatewayEventFrame) {
|
860 | 860 | host.eventLog = host.eventLogBuffer; |
861 | 861 | } |
862 | 862 | |
863 | | -if (evt.event === "agent") { |
| 863 | +if (evt.event === "agent" || evt.event === "session.tool") { |
864 | 864 | if (host.onboarding) { |
865 | 865 | return; |
866 | 866 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。