惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
Google DeepMind News
Google DeepMind News
云风的 BLOG
云风的 BLOG
WordPress大学
WordPress大学
Vercel News
Vercel News
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
I
InfoQ
小众软件
小众软件
Recent Announcements
Recent Announcements
博客园 - 【当耐特】
The GitHub Blog
The GitHub Blog
大猫的无限游戏
大猫的无限游戏
美团技术团队
T
The Blog of Author Tim Ferriss
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog
V
V2EX
J
Java Code Geeks
有赞技术团队
有赞技术团队
博客园 - 聂微东
B
Blog RSS Feed
博客园 - 司徒正美

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
feat: WhatsApp status reactions, new emoji categories, se...
gado-ships-i · 2026-05-14 · via Recent Commits to openclaw:main

@@ -1,4 +1,5 @@

11

import { deliverInboundReplyWithMessageSendContext } from "openclaw/plugin-sdk/channel-message";

2+

import { DEFAULT_TIMING, type StatusReactionController } from "openclaw/plugin-sdk/channel-feedback";

23

import { hasVisibleInboundReplyDispatch } from "openclaw/plugin-sdk/inbound-reply-dispatch";

34

import type { FinalizedMsgContext } from "openclaw/plugin-sdk/reply-runtime";

45

import {

@@ -399,7 +400,14 @@ export async function dispatchWhatsAppBufferedReply(params: {

399400

replyResolver: typeof getReplyFromConfig;

400401

route: ReturnType<typeof resolveAgentRoute>;

401402

shouldClearGroupHistory: boolean;

403+

statusReactionController?: StatusReactionController | null;

402404

}) {

405+

const statusReactionController = params.statusReactionController ?? null;

406+

const statusReactionTiming = {

407+

...DEFAULT_TIMING,

408+

...params.cfg.messages?.statusReactions?.timing,

409+

};

410+

const removeAckAfterReply = params.cfg.messages?.removeAckAfterReply ?? false;

403411

const textLimit = params.maxMediaTextChunkLimit ?? resolveTextChunkLimit(params.cfg, "whatsapp");

404412

const chunkMode = resolveChunkMode(params.cfg, "whatsapp", params.route.accountId);

405413

const tableMode = resolveMarkdownTableMode({

@@ -484,6 +492,10 @@ export async function dispatchWhatsAppBufferedReply(params: {

484492

},

485493

});

486494495+

if (statusReactionController) {

496+

void statusReactionController.setThinking();

497+

}

498+487499

const { queuedFinal, counts } = await dispatchReplyWithBufferedBlockDispatcher({

488500

ctx: params.context,

489501

cfg: params.cfg,

@@ -563,6 +575,17 @@ export async function dispatchWhatsAppBufferedReply(params: {

563575

await deliverNormalizedPayload(normalizedDeliveryPayload, info);

564576

},

565577

onReplyStart: params.msg.sendComposing,

578+

...(statusReactionController

579+

? {

580+

onCompactionStart: async () => {

581+

await statusReactionController.setCompacting();

582+

},

583+

onCompactionEnd: async () => {

584+

statusReactionController.cancelPending();

585+

await statusReactionController.setThinking();

586+

},

587+

}

588+

: {}),

566589

onError: (err, info) => {

567590

logWhatsAppReplyDeliveryError({

568591

err,

@@ -578,22 +601,84 @@ export async function dispatchWhatsAppBufferedReply(params: {

578601

disableBlockStreaming,

579602

...(sourceReplyDeliveryMode ? { sourceReplyDeliveryMode } : {}),

580603

onModelSelected: params.onModelSelected,

604+

...(statusReactionController

605+

? {

606+

onToolStart: async (payload: { name?: string }) => {

607+

const toolName = payload.name?.trim();

608+

if (toolName) {

609+

await statusReactionController.setTool(toolName);

610+

}

611+

},

612+

}

613+

: {}),

581614

},

582615

});

583616

logWhatsAppMediaOnlyFlushResult(await mediaOnlyCoalescer.flushAll());

584617585618

const didQueueVisibleReply = hasVisibleInboundReplyDispatch({ queuedFinal, counts });

586619

if (!didQueueVisibleReply) {

620+

if (statusReactionController) {

621+

void finalizeWhatsAppStatusReaction({

622+

controller: statusReactionController,

623+

outcome: "error",

624+

hasFinalResponse: false,

625+

removeAckAfterReply,

626+

timing: statusReactionTiming,

627+

});

628+

}

587629

if (params.shouldClearGroupHistory) {

588630

params.groupHistories.set(params.groupHistoryKey, []);

589631

}

590632

logVerbose("Skipping auto-reply: silent token or no text/media returned from resolver");

591633

return false;

592634

}

593635636+

if (statusReactionController) {

637+

void finalizeWhatsAppStatusReaction({

638+

controller: statusReactionController,

639+

outcome: didSendReply ? "done" : "error",

640+

hasFinalResponse: didSendReply,

641+

removeAckAfterReply,

642+

timing: statusReactionTiming,

643+

});

644+

}

645+594646

if (params.shouldClearGroupHistory) {

595647

params.groupHistories.set(params.groupHistoryKey, []);

596648

}

597649598650

return didSendReply;

599651

}

652+653+

async function finalizeWhatsAppStatusReaction(params: {

654+

controller: StatusReactionController;

655+

outcome: "done" | "error";

656+

hasFinalResponse: boolean;

657+

removeAckAfterReply: boolean;

658+

timing: typeof DEFAULT_TIMING;

659+

}): Promise<void> {

660+

if (params.outcome === "done") {

661+

await params.controller.setDone();

662+

if (params.removeAckAfterReply) {

663+

await new Promise<void>((resolve) => setTimeout(resolve, params.timing.doneHoldMs));

664+

await params.controller.clear();

665+

} else {

666+

await params.controller.restoreInitial();

667+

}

668+

return;

669+

}

670+

await params.controller.setError();

671+

if (params.hasFinalResponse) {

672+

if (params.removeAckAfterReply) {

673+

await new Promise<void>((resolve) => setTimeout(resolve, params.timing.errorHoldMs));

674+

await params.controller.clear();

675+

} else {

676+

await params.controller.restoreInitial();

677+

}

678+

return;

679+

}

680+

if (params.removeAckAfterReply) {

681+

await new Promise<void>((resolve) => setTimeout(resolve, params.timing.errorHoldMs));

682+

}

683+

await params.controller.restoreInitial();

684+

}