@yaoyuanchao/dingtalk 1.7.4 → 1.7.5
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/package.json +1 -1
- package/src/monitor.ts +5 -17
package/package.json
CHANGED
package/src/monitor.ts
CHANGED
|
@@ -1668,7 +1668,6 @@ async function dispatchWithFullPipeline(params: {
|
|
|
1668
1668
|
log, setStatus, onFirstReply } = params;
|
|
1669
1669
|
|
|
1670
1670
|
let firstReplyFired = false;
|
|
1671
|
-
let typingSafetyTimeout: ReturnType<typeof setTimeout> | null = null;
|
|
1672
1671
|
|
|
1673
1672
|
// 1. Resolve agent route via own bindings matching (like official plugin).
|
|
1674
1673
|
// OpenClaw's resolveAgentRoute doesn't handle accountId correctly for multi-account.
|
|
@@ -1764,7 +1763,6 @@ async function dispatchWithFullPipeline(params: {
|
|
|
1764
1763
|
// Recall typing indicator on first delivery
|
|
1765
1764
|
if (!firstReplyFired && onFirstReply) {
|
|
1766
1765
|
firstReplyFired = true;
|
|
1767
|
-
if (typingSafetyTimeout) { clearTimeout(typingSafetyTimeout); typingSafetyTimeout = null; }
|
|
1768
1766
|
await onFirstReply().catch((err) => {
|
|
1769
1767
|
log?.info?.("[dingtalk] onFirstReply error: " + err);
|
|
1770
1768
|
});
|
|
@@ -1792,21 +1790,11 @@ async function dispatchWithFullPipeline(params: {
|
|
|
1792
1790
|
await rt.channel.reply.dispatchReplyFromConfig({ ctx, cfg, dispatcher, replyOptions });
|
|
1793
1791
|
} finally {
|
|
1794
1792
|
markDispatchIdle();
|
|
1795
|
-
// Don't recall typing
|
|
1796
|
-
//
|
|
1797
|
-
//
|
|
1798
|
-
//
|
|
1799
|
-
//
|
|
1800
|
-
if (!firstReplyFired && onFirstReply) {
|
|
1801
|
-
const TYPING_SAFETY_TIMEOUT_MS = 3 * 60 * 1000; // 3 minutes
|
|
1802
|
-
typingSafetyTimeout = setTimeout(async () => {
|
|
1803
|
-
if (!firstReplyFired && onFirstReply) {
|
|
1804
|
-
firstReplyFired = true;
|
|
1805
|
-
log?.info?.('[dingtalk] Typing safety timeout — recalling after no delivery');
|
|
1806
|
-
await onFirstReply().catch(() => {});
|
|
1807
|
-
}
|
|
1808
|
-
}, TYPING_SAFETY_TIMEOUT_MS);
|
|
1809
|
-
}
|
|
1793
|
+
// Don't recall typing here — dispatchReplyFromConfig resolves when dispatch
|
|
1794
|
+
// is *initiated*, not when the agent finishes. The agent may still be doing
|
|
1795
|
+
// tool calls for many minutes before producing text. The deliver callback
|
|
1796
|
+
// above handles recall on first delivery. If the agent crashes without
|
|
1797
|
+
// replying, the emoji reaction simply stays — acceptable tradeoff.
|
|
1810
1798
|
}
|
|
1811
1799
|
|
|
1812
1800
|
// 10. Record activity
|