@wecom/wecom-openclaw-plugin 2026.3.25-beta.1 → 2026.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -680,7 +680,7 @@ async function sendWeComReply(params) {
680
680
  }
681
681
  catch (err) {
682
682
  // 服务端返回 846608:流式消息超过6分钟无法更新,需降级为主动发送
683
- const errMsg = err?.errmsg || err?.message || (typeof err === "object" ? JSON.stringify(err) : String(err));
683
+ const errMsg = err?.errmsg || err?.message || String(err);
684
684
  if (err?.errcode === STREAM_EXPIRED_ERRCODE ||
685
685
  errMsg.includes(String(STREAM_EXPIRED_ERRCODE))) {
686
686
  throw new StreamExpiredError(errMsg);
@@ -1713,7 +1713,7 @@ async function sendMediaBatch(ctx, mediaUrls) {
1713
1713
  const body = frame.body;
1714
1714
  const chatId = body.chatid || body.from.userid;
1715
1715
  const mediaLocalRoots = await getExtendedMediaLocalRoots(account.config);
1716
- runtime.log?.(`[wecom][debug] mediaLocalRoots=${JSON.stringify(mediaLocalRoots)}, mediaUrls=${JSON.stringify(mediaUrls)}, hasText=${!!state.hasText}`);
1716
+ runtime.log?.(`[wecom][debug] mediaLocalRoots=${JSON.stringify(mediaLocalRoots)}, mediaUrls=${JSON.stringify(mediaUrls)}`);
1717
1717
  for (const mediaUrl of mediaUrls) {
1718
1718
  const result = await uploadAndSendMedia({
1719
1719
  wsClient,
@@ -1873,7 +1873,7 @@ async function routeAndDispatchMessage(params) {
1873
1873
  }
1874
1874
  }
1875
1875
  // 中间帧:有可见文本时流式更新(流式过期后跳过,等 deliver 完成后主动发送)
1876
- if (info.kind !== "final" && state.hasText && state.accumulatedText && !state.streamExpired) {
1876
+ if (info.kind !== "final" && state.accumulatedText && !state.streamExpired) {
1877
1877
  try {
1878
1878
  await sendWeComReply({ wsClient, frame, text: state.accumulatedText, runtime, finish: false, streamId: state.streamId });
1879
1879
  }