mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:20:43 +00:00
fix: scope messaging tool final reply dedupe
Co-authored-by: HCL <chenglunhu@gmail.com>
This commit is contained in:
@@ -179,6 +179,8 @@ describe("createCodexDynamicToolBridge", () => {
|
||||
provider: "telegram",
|
||||
to: "chat-1",
|
||||
threadId: "thread-ts-1",
|
||||
text: "hello from Codex",
|
||||
mediaUrls: ["/tmp/reply.png"],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@@ -231,13 +231,16 @@ function collectToolTelemetry(params: {
|
||||
if (text) {
|
||||
params.telemetry.messagingToolSentTexts.push(text);
|
||||
}
|
||||
params.telemetry.messagingToolSentMediaUrls.push(...collectMediaUrls(params.args));
|
||||
const mediaUrls = collectMediaUrls(params.args);
|
||||
params.telemetry.messagingToolSentMediaUrls.push(...mediaUrls);
|
||||
params.telemetry.messagingToolSentTargets.push({
|
||||
tool: params.toolName,
|
||||
provider: readFirstString(params.args, ["provider", "channel"]) ?? params.toolName,
|
||||
accountId: readFirstString(params.args, ["accountId", "account_id"]),
|
||||
to: readFirstString(params.args, ["to", "target", "recipient"]),
|
||||
threadId: readFirstString(params.args, ["threadId", "thread_id", "messageThreadId"]),
|
||||
...(text ? { text } : {}),
|
||||
...(mediaUrls.length > 0 ? { mediaUrls } : {}),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -308,6 +308,8 @@ describe("OpenClaw-owned tool runtime contract — Codex app-server adapter", ()
|
||||
provider: "telegram",
|
||||
to: "chat-1",
|
||||
threadId: "thread-ts-1",
|
||||
text: "hello from Codex",
|
||||
mediaUrls: ["/tmp/codex-reply.png"],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user