mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-09 05:20:46 +08:00
feat(feishu): expand menu card buttons and keep repair number-only
Add stop/compact/settings/watchlist buttons to the hub menu card, route repair through the numeric fallback (reply 6) without an extra button, and sync the menu help and card-structure test assertions. Rebuild the lib bundle so the published artifact carries the changes.
This commit is contained in:
parent
0e5b9e0e98
commit
7d2c93da86
4 changed files with 228 additions and 145 deletions
|
|
@ -17,13 +17,17 @@ function buttons(value, result = []) {
|
|||
return result;
|
||||
}
|
||||
|
||||
test('menu appends watchlist and keeps repair number-only', () => {
|
||||
test('menu exposes the increased command set and keeps repair number-only', () => {
|
||||
const card = JSON.parse(menuCard());
|
||||
assert.match(JSON.stringify(card), /6 · 修复卡片按钮/);
|
||||
const actions = buttons(card).flatMap((button) => (
|
||||
button.behaviors?.map((behavior) => behavior?.value?.action) ?? []
|
||||
));
|
||||
assert.deepEqual(actions, ['sessions', 'workspaces', 'new', 'status', 'help', 'watchlist']);
|
||||
assert.deepEqual(actions, [
|
||||
'new', 'sessions', 'workspaces', 'stop', 'compact',
|
||||
'watchlist', 'status', 'settings', 'help',
|
||||
]);
|
||||
// 修复不占位按钮:仅通过数字兜底「6」触发(见 bridge)
|
||||
assert.equal(actions.includes('repair'), false);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue