mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 08:01:23 +00:00
refactor: extract iMessage echo cache and unify suppression guards
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { parseReplyDirectives } from "../../auto-reply/reply/reply-directives.js";
|
||||
import { isRenderablePayload } from "../../auto-reply/reply/reply-payloads.js";
|
||||
import {
|
||||
isRenderablePayload,
|
||||
shouldSuppressReasoningPayload,
|
||||
} from "../../auto-reply/reply/reply-payloads.js";
|
||||
import type { ReplyPayload } from "../../auto-reply/types.js";
|
||||
|
||||
export type NormalizedOutboundPayload = {
|
||||
@@ -41,7 +44,7 @@ export function normalizeReplyPayloadsForDelivery(
|
||||
payloads: readonly ReplyPayload[],
|
||||
): ReplyPayload[] {
|
||||
return payloads.flatMap((payload) => {
|
||||
if (payload.isReasoning) {
|
||||
if (shouldSuppressReasoningPayload(payload)) {
|
||||
return [];
|
||||
}
|
||||
const parsed = parseReplyDirectives(payload.text ?? "");
|
||||
|
||||
Reference in New Issue
Block a user