mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-11 17:20:53 +08:00
feat: add agent preset chat commands
This commit is contained in:
parent
2ad6f1a44e
commit
eea29fe296
33 changed files with 1519 additions and 234 deletions
|
|
@ -168,6 +168,13 @@ test('Telegram API registers the command menu and commands-type menu button', as
|
|||
await api.setMyCommands({ commands: TELEGRAM_COMMAND_MENU });
|
||||
await api.setChatMenuButton();
|
||||
assert.equal(calls.length, 2);
|
||||
assert.deepEqual(
|
||||
TELEGRAM_COMMAND_MENU.filter(({ command }) => command === 'presetlist' || command === 'preset'),
|
||||
[
|
||||
{ command: 'presetlist', description: '列出可用 Agent Preset' },
|
||||
{ command: 'preset', description: '查看或设置新会话 Agent Preset' },
|
||||
],
|
||||
);
|
||||
assert.match(calls[0].url.pathname, /setMyCommands$/);
|
||||
assert.deepEqual(calls[0].body, { commands: TELEGRAM_COMMAND_MENU });
|
||||
assert.match(calls[1].url.pathname, /setChatMenuButton$/);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue