mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-09 17:33:14 +08:00
feat: add stable proactive delivery
This commit is contained in:
parent
410cb822d7
commit
31792d7bc8
88 changed files with 6427 additions and 488 deletions
|
|
@ -107,6 +107,7 @@ function fixture({
|
|||
starts: 0,
|
||||
stops: 0,
|
||||
sentTests: [],
|
||||
proactiveSends: [],
|
||||
probes: [],
|
||||
responseModes: [],
|
||||
repair,
|
||||
|
|
@ -127,6 +128,10 @@ function fixture({
|
|||
runtime.sentTests.push(text);
|
||||
return { sent: true };
|
||||
},
|
||||
async sendProactiveText(...args) {
|
||||
runtime.proactiveSends.push(args);
|
||||
return { sent: true };
|
||||
},
|
||||
setGroupResponseMode(mode) {
|
||||
runtime.responseModes.push(mode);
|
||||
runtime.config.groupResponseMode = mode;
|
||||
|
|
@ -793,6 +798,11 @@ test('connection test uses the selected bot runtime and shared message copy', as
|
|||
assert.deepEqual(fx.runtimes.get(healthy.id)[0].sentTests, [
|
||||
'✅ DeepSeek Harness 连接测试成功\n这条消息由「IM机器人」设置页中的“机器人 healthy(cli_heal••••7890)”机器人卡片发出。',
|
||||
]);
|
||||
const target = { kind: 'group', route: { chatId: 'oc_target' } };
|
||||
assert.deepEqual(await fx.controller.sendProactiveText(healthy.id, target, '主动投递'), {
|
||||
sent: true,
|
||||
});
|
||||
assert.deepEqual(fx.runtimes.get(healthy.id)[0].proactiveSends, [[target, '主动投递', {}]]);
|
||||
await fx.controller.close();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue