mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 15:38:25 +00:00
feat: improve /help and /commands formatting with categories and pagination
- Add CommandCategory type to organize commands into groups (session, options, status, management, media, tools, docks) - Refactor /help to show grouped sections for better discoverability - Add pagination support for /commands on Telegram (8 commands per page with nav buttons) - Show grouped list without pagination on other channels - Handle commands_page_N callback queries for Telegram pagination navigation
This commit is contained in:
committed by
Gustavo Madeira Santana
parent
d3a6333ef7
commit
d91b4a3045
@@ -2,6 +2,15 @@ import type { ClawdbotConfig } from "../config/types.js";
|
||||
|
||||
export type CommandScope = "text" | "native" | "both";
|
||||
|
||||
export type CommandCategory =
|
||||
| "session"
|
||||
| "options"
|
||||
| "status"
|
||||
| "management"
|
||||
| "media"
|
||||
| "tools"
|
||||
| "docks";
|
||||
|
||||
export type CommandArgType = "string" | "number" | "boolean";
|
||||
|
||||
export type CommandArgChoiceContext = {
|
||||
@@ -51,6 +60,7 @@ export type ChatCommandDefinition = {
|
||||
formatArgs?: (values: CommandArgValues) => string | undefined;
|
||||
argsMenu?: CommandArgMenuSpec | "auto";
|
||||
scope: CommandScope;
|
||||
category?: CommandCategory;
|
||||
};
|
||||
|
||||
export type NativeCommandSpec = {
|
||||
|
||||
Reference in New Issue
Block a user