From 5b7443d175aed9143d70eb53a98aaa9e65d61cad Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Tue, 31 Mar 2026 22:24:11 +0900 Subject: [PATCH] perf(whatsapp): narrow reply chunking imports --- extensions/whatsapp/src/auto-reply/deliver-reply.ts | 4 ++-- src/plugin-sdk/reply-chunking.ts | 2 ++ test/fixtures/test-timings.channels.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/extensions/whatsapp/src/auto-reply/deliver-reply.ts b/extensions/whatsapp/src/auto-reply/deliver-reply.ts index 92501c46fdd..5cf5996841b 100644 --- a/extensions/whatsapp/src/auto-reply/deliver-reply.ts +++ b/extensions/whatsapp/src/auto-reply/deliver-reply.ts @@ -1,10 +1,10 @@ import type { MarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import { chunkMarkdownTextWithMode, type ChunkMode } from "openclaw/plugin-sdk/reply-chunking"; +import type { ReplyPayload } from "openclaw/plugin-sdk/reply-chunking"; import { resolveOutboundMediaUrls, sendMediaWithLeadingCaption, } from "openclaw/plugin-sdk/reply-payload"; -import { chunkMarkdownTextWithMode, type ChunkMode } from "openclaw/plugin-sdk/reply-runtime"; -import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime"; import { logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env"; import { convertMarkdownTables } from "openclaw/plugin-sdk/text-runtime"; import { markdownToWhatsApp } from "openclaw/plugin-sdk/text-runtime"; diff --git a/src/plugin-sdk/reply-chunking.ts b/src/plugin-sdk/reply-chunking.ts index a2fb8edef12..81362226fa7 100644 --- a/src/plugin-sdk/reply-chunking.ts +++ b/src/plugin-sdk/reply-chunking.ts @@ -3,4 +3,6 @@ export { resolveChunkMode, resolveTextChunkLimit, } from "../auto-reply/chunk.js"; +export type { ChunkMode } from "../auto-reply/chunk.js"; export { isSilentReplyText } from "../auto-reply/tokens.js"; +export type { ReplyPayload } from "../auto-reply/types.js"; diff --git a/test/fixtures/test-timings.channels.json b/test/fixtures/test-timings.channels.json index 271cd4e59e7..b5ffe6a0065 100644 --- a/test/fixtures/test-timings.channels.json +++ b/test/fixtures/test-timings.channels.json @@ -88,7 +88,7 @@ "durationMs": 2300 }, "extensions/whatsapp/src/auto-reply/deliver-reply.test.ts": { - "durationMs": 12400 + "durationMs": 10260 }, "extensions/slack/src/monitor/events/reactions.test.ts": { "durationMs": 2200