feat(discord): make the typed first-message hint a separate opt-in, off by default

Claude keeps the silent system-prompt hint (startupHint, on). Other CLIs are sent the typed message only with typedHint, which costs a model turn per tab.
This commit is contained in:
Devvyn committed 2026-10-30 01:38:37 +08:00
1 parent e95d38a944
commit 6d4357502b
10 files changed
+77 -27

No files matched your search

+13
View File
@@ -79,6 +79,19 @@ describe('/api/discord', () => {
bridge.stop();
});
it('stores startupHint (default on) and typedHint (default off) and returns them', async () => {
const { app, bridge } = await harness();
const first = (await app.inject({ method: 'GET', url: '/api/discord' })).json().data;
expect(first).toMatchObject({ startupHint: true, typedHint: false });
const put = await app.inject({
method: 'PUT',
url: '/api/discord',
payload: { typedHint: true, startupHint: false },
});
expect(put.json().data).toMatchObject({ startupHint: false, typedHint: true });
bridge.stop();
});
it('refuses a bad id, an incomplete enable, and unknown fields', async () => {
const { app } = await harness();
const bad = await app.inject({ method: 'PUT', url: '/api/discord', payload: { guildId: 'not-a-number' } });