feat(feishu): add configurable group response mode

This commit is contained in:
xmanrui 2026-08-22 01:26:29 +08:00
parent 1a86fa5013
commit 9950261a49
19 changed files with 615 additions and 150 deletions

View file

@ -23,6 +23,10 @@ test('PluginConfigStore persists non-secret onboarding facts', async () => {
assert.doesNotMatch(raw, /must-not-be-written/);
assert.equal((await stat(path)).mode & 0o777, 0o600);
assert.equal((await new PluginConfigStore(path).load()).get().appId, 'cli_test');
assert.equal(store.get().groupResponseMode, 'mention');
await store.save({ ...store.get(), groupResponseMode: 'all' });
assert.equal((await new PluginConfigStore(path).load()).get().groupResponseMode, 'all');
await store.clear();
assert.equal(store.get(), null);
@ -66,6 +70,7 @@ test('PluginConfigStore migrates a v1 bot atomically without moving its credenti
assert.deepEqual(migrated.bots[0].ownerOpenIds, ['ou_legacy']);
assert.equal(store.get().ownerOpenId, 'ou_legacy');
assert.equal(store.list()[0].appId, 'cli_legacy');
assert.equal(store.list()[0].groupResponseMode, 'mention');
});
test('PluginConfigStore rejects an invalid or duplicate v2 document without dropping entries', async () => {