openclaw-elys 1.7.0 → 1.7.1
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/src/monitor.d.ts +0 -1
- package/dist/src/monitor.js +17 -21
- package/package.json +1 -1
package/dist/src/monitor.d.ts
CHANGED
package/dist/src/monitor.js
CHANGED
|
@@ -35,7 +35,7 @@ export async function monitorElysProvider(opts) {
|
|
|
35
35
|
log(`[elys] pluginRuntime available: ${!!core}, dispatchReplyFromConfig: ${!!dispatchReplyFromConfig}, finalizeCtx: ${!!finalizeCtx}`);
|
|
36
36
|
const commandHandler = async (cmd, signal) => {
|
|
37
37
|
log(`[elys] executing command: ${cmd.command}`, cmd.args);
|
|
38
|
-
if (dispatchReplyFromConfig && finalizeCtx) {
|
|
38
|
+
if (dispatchReplyFromConfig && finalizeCtx && withReplyDispatcher) {
|
|
39
39
|
try {
|
|
40
40
|
let seq = 0;
|
|
41
41
|
let fullText = "";
|
|
@@ -77,31 +77,27 @@ export async function monitorElysProvider(opts) {
|
|
|
77
77
|
log(`[elys] final reply delivered (empty)`);
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}),
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
// Direct dispatch fallback
|
|
80
|
+
// Create dispatcher + dispatch (same pattern as feishu built-in channel)
|
|
81
|
+
const createDispatcher = core.channel.reply.createReplyDispatcherWithTyping;
|
|
82
|
+
const { dispatcher, replyOptions, markDispatchIdle } = createDispatcher({
|
|
83
|
+
deliver,
|
|
84
|
+
onError: (err, info) => {
|
|
85
|
+
log(`[elys] dispatch error (${info.kind}):`, err);
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
try {
|
|
94
89
|
await dispatchReplyFromConfig({
|
|
95
90
|
ctx: inboundCtx,
|
|
96
91
|
cfg: opts.config,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
onError: (err, info) => {
|
|
100
|
-
log(`[elys] dispatch error (${info.kind}):`, err);
|
|
101
|
-
},
|
|
102
|
-
},
|
|
92
|
+
dispatcher,
|
|
93
|
+
replyOptions,
|
|
103
94
|
});
|
|
104
95
|
}
|
|
96
|
+
finally {
|
|
97
|
+
dispatcher.markComplete();
|
|
98
|
+
await dispatcher.waitForIdle().catch(() => { });
|
|
99
|
+
markDispatchIdle();
|
|
100
|
+
}
|
|
105
101
|
return {
|
|
106
102
|
id: cmd.id,
|
|
107
103
|
type: "result",
|