mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 19:04:58 +00:00
fix: tighten commands output + telegram pagination (#2504)
Co-authored-by: hougangdev <hougangdev@users.noreply.github.com>
This commit is contained in:
committed by
Gustavo Madeira Santana
parent
97440eaf52
commit
cc1782b105
13
src/auto-reply/reply/commands-info.test.ts
Normal file
13
src/auto-reply/reply/commands-info.test.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { buildCommandsPaginationKeyboard } from "./commands-info.js";
|
||||
|
||||
describe("buildCommandsPaginationKeyboard", () => {
|
||||
it("adds agent id to callback data when provided", () => {
|
||||
const keyboard = buildCommandsPaginationKeyboard(2, 3, "agent-main");
|
||||
expect(keyboard[0]).toEqual([
|
||||
{ text: "◀ Prev", callback_data: "commands_page_1:agent-main" },
|
||||
{ text: "2/3", callback_data: "commands_page_noop:agent-main" },
|
||||
{ text: "Next ▶", callback_data: "commands_page_3:agent-main" },
|
||||
]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user