@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 +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/src/interface.d.ts +0 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -653,7 +653,7 @@ async function sendWeComReply(params) {
|
|
|
653
653
|
}
|
|
654
654
|
catch (err) {
|
|
655
655
|
// 服务端返回 846608:流式消息超过6分钟无法更新,需降级为主动发送
|
|
656
|
-
const errMsg = err?.errmsg || err?.message ||
|
|
656
|
+
const errMsg = err?.errmsg || err?.message || String(err);
|
|
657
657
|
if (err?.errcode === STREAM_EXPIRED_ERRCODE ||
|
|
658
658
|
errMsg.includes(String(STREAM_EXPIRED_ERRCODE))) {
|
|
659
659
|
throw new StreamExpiredError(errMsg);
|
|
@@ -1686,7 +1686,7 @@ async function sendMediaBatch(ctx, mediaUrls) {
|
|
|
1686
1686
|
const body = frame.body;
|
|
1687
1687
|
const chatId = body.chatid || body.from.userid;
|
|
1688
1688
|
const mediaLocalRoots = await getExtendedMediaLocalRoots(account.config);
|
|
1689
|
-
runtime.log?.(`[wecom][debug] mediaLocalRoots=${JSON.stringify(mediaLocalRoots)}, mediaUrls=${JSON.stringify(mediaUrls)}
|
|
1689
|
+
runtime.log?.(`[wecom][debug] mediaLocalRoots=${JSON.stringify(mediaLocalRoots)}, mediaUrls=${JSON.stringify(mediaUrls)}`);
|
|
1690
1690
|
for (const mediaUrl of mediaUrls) {
|
|
1691
1691
|
const result = await uploadAndSendMedia({
|
|
1692
1692
|
wsClient,
|
|
@@ -1846,7 +1846,7 @@ async function routeAndDispatchMessage(params) {
|
|
|
1846
1846
|
}
|
|
1847
1847
|
}
|
|
1848
1848
|
// 中间帧:有可见文本时流式更新(流式过期后跳过,等 deliver 完成后主动发送)
|
|
1849
|
-
if (info.kind !== "final" && state.
|
|
1849
|
+
if (info.kind !== "final" && state.accumulatedText && !state.streamExpired) {
|
|
1850
1850
|
try {
|
|
1851
1851
|
await sendWeComReply({ wsClient, frame, text: state.accumulatedText, runtime, finish: false, streamId: state.streamId });
|
|
1852
1852
|
}
|