Skip to content

Commit aa50c51

Browse files
committed
fix: preserve webchat source reply details
1 parent 0dabb70 commit aa50c51

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Docs: https://docs.openclaw.ai
1010

1111
### Fixes
1212

13+
- WebChat: keep message-tool replies visible in the chat while still summarizing internal tool results for the model. Fixes #86347. Thanks @shakkernerd.
1314
- Agents/commitments: serialize commitment store load-modify-save writes so concurrent heartbeat and CLI updates no longer lose dismissal, sent, or attempt state. (#81153) Thanks @ai-hpc.
1415
- Gateway/perf: tighten restart and startup benchmark failure handling so long profiling runs, failed probes, and fresh Linux runners no longer produce false passing or `n/a` results.
1516
- Checks: keep intentional Knip unused-file findings optional so full CI and sparse proof workspaces stay aligned.

‎src/infra/outbound/message-action-runner.send-validation.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,13 @@ describe("runMessageAction send validation", () => {
132132
target: "current-run",
133133
sourceReplyDeliveryMode: "message_tool_only",
134134
sourceReplySink: "internal-ui",
135+
sourceReply: {
136+
text: "hello from codex",
137+
},
138+
message: "hello from codex",
135139
dryRun: false,
136140
});
137-
expect(JSON.stringify(result.toolResult)).not.toContain("hello from codex");
141+
expect(JSON.stringify(result.toolResult?.content)).not.toContain("hello from codex");
138142
});
139143

140144
it("strips unsupported citation control markers from internal UI source replies", async () => {

‎src/infra/outbound/message-action-runner.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,10 @@ function buildInternalSourceReplyToolResult(payload: {
745745
target: string;
746746
sourceReplyDeliveryMode?: SourceReplyDeliveryMode;
747747
sourceReplySink?: "internal-ui";
748+
sourceReply: ReplyPayload;
749+
message?: string;
750+
mediaUrl?: string;
751+
mediaUrls?: string[];
748752
dryRun: boolean;
749753
}): AgentToolResult<{
750754
status: string;
@@ -753,6 +757,10 @@ function buildInternalSourceReplyToolResult(payload: {
753757
target: string;
754758
sourceReplyDeliveryMode?: SourceReplyDeliveryMode;
755759
sourceReplySink?: "internal-ui";
760+
sourceReply: ReplyPayload;
761+
message?: string;
762+
mediaUrl?: string;
763+
mediaUrls?: string[];
756764
dryRun: boolean;
757765
}> {
758766
const action = payload.dryRun ? "Prepared" : "Sent";
@@ -773,6 +781,10 @@ function buildInternalSourceReplyToolResult(payload: {
773781
? { sourceReplyDeliveryMode: payload.sourceReplyDeliveryMode }
774782
: {}),
775783
...(payload.sourceReplySink ? { sourceReplySink: payload.sourceReplySink } : {}),
784+
sourceReply: payload.sourceReply,
785+
...(payload.message ? { message: payload.message } : {}),
786+
...(payload.mediaUrl ? { mediaUrl: payload.mediaUrl } : {}),
787+
...(payload.mediaUrls?.length ? { mediaUrls: payload.mediaUrls } : {}),
776788
dryRun: payload.dryRun,
777789
},
778790
};

0 commit comments

Comments
 (0)