mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-12 16:40:44 +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
|
|
@ -3,6 +3,7 @@ import test from 'node:test';
|
|||
import {
|
||||
cardActionProbeCard,
|
||||
menuCard,
|
||||
menuHelpText,
|
||||
} from '../../../src/channels/feishu/feishu-cards.mjs';
|
||||
|
||||
function buttons(value, result = []) {
|
||||
|
|
@ -26,6 +27,14 @@ test('menu appends watchlist and keeps repair number-only', () => {
|
|||
assert.equal(actions.includes('repair'), false);
|
||||
});
|
||||
|
||||
test('menu help advertises Agent Preset commands', () => {
|
||||
const help = menuHelpText();
|
||||
assert.match(help, /\/presetlist/);
|
||||
assert.match(help, /\/preset \[序号或完整ID\]/);
|
||||
assert.match(help, /\/preset id:<ID>/);
|
||||
assert.match(help, /\/preset --default/);
|
||||
});
|
||||
|
||||
test('card-action probe carries only its action and opaque nonce', () => {
|
||||
const nonce = '0123456789abcdef0123456789abcdef';
|
||||
const card = JSON.parse(cardActionProbeCard(nonce));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue