mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 09:27:39 +00:00
refactor: unify outbound result envelopes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { CliDeps } from "../cli/deps.js";
|
||||
import { callGateway, randomIdempotencyKey } from "../gateway/call.js";
|
||||
import { success } from "../globals.js";
|
||||
import { buildOutboundResultEnvelope } from "../infra/outbound/envelope.js";
|
||||
import {
|
||||
buildOutboundDeliveryJson,
|
||||
formatGatewaySummary,
|
||||
@@ -89,12 +90,14 @@ export async function pollCommand(
|
||||
runtime.log(
|
||||
JSON.stringify(
|
||||
{
|
||||
...buildOutboundDeliveryJson({
|
||||
provider,
|
||||
via: "gateway",
|
||||
to: opts.to,
|
||||
result,
|
||||
mediaUrl: null,
|
||||
...buildOutboundResultEnvelope({
|
||||
delivery: buildOutboundDeliveryJson({
|
||||
provider,
|
||||
via: "gateway",
|
||||
to: opts.to,
|
||||
result,
|
||||
mediaUrl: null,
|
||||
}),
|
||||
}),
|
||||
question: normalized.question,
|
||||
options: normalized.options,
|
||||
|
||||
Reference in New Issue
Block a user