openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
118 lines (117 loc) • 2.52 kB
JavaScript
import { t as getChatCommands } from "./commands-registry.data-CJQNnHNA.js";
//#region src/acp/commands.ts
const BASE_AVAILABLE_COMMANDS = [
{
name: "help",
description: "Show help and common commands."
},
{
name: "commands",
description: "List available commands."
},
{
name: "status",
description: "Show current status."
},
{
name: "context",
description: "Explain context usage (list|detail|json).",
input: { hint: "list | detail | json" }
},
{
name: "whoami",
description: "Show sender id (alias: /id)."
},
{
name: "id",
description: "Alias for /whoami."
},
{
name: "subagents",
description: "List or manage sub-agents."
},
{
name: "config",
description: "Read or write config (owner-only)."
},
{
name: "debug",
description: "Set runtime-only overrides (owner-only)."
},
{
name: "usage",
description: "Toggle usage footer (off|tokens|full)."
},
{
name: "stop",
description: "Stop the current run."
},
{
name: "restart",
description: "Restart the gateway (if enabled)."
},
{
name: "activation",
description: "Set group activation (mention|always)."
},
{
name: "send",
description: "Set send mode (on|off|inherit)."
},
{
name: "reset",
description: "Reset the session (/new)."
},
{
name: "new",
description: "Reset the session (/reset)."
},
{
name: "think",
description: "Set thinking level (off|minimal|low|medium|high|xhigh)."
},
{
name: "verbose",
description: "Set verbose mode (on|full|off)."
},
{
name: "trace",
description: "Set plugin trace mode (on|off)."
},
{
name: "reasoning",
description: "Toggle reasoning output (on|off|stream)."
},
{
name: "elevated",
description: "Toggle elevated mode (on|off)."
},
{
name: "model",
description: "Select a model (list|status|<name>)."
},
{
name: "queue",
description: "Adjust queue mode and options."
},
{
name: "bash",
description: "Run a host command (if enabled)."
},
{
name: "compact",
description: "Compact the session history."
}
];
function listDockAvailableCommands() {
return getChatCommands().filter((command) => command.key.startsWith("dock:")).map((command) => ({
name: command.textAliases[0]?.replace(/^\//, "").trim() || command.key,
description: command.description
}));
}
/** Returns static ACP commands plus plugin-registered dock commands. */
function getAvailableCommands() {
return [...BASE_AVAILABLE_COMMANDS, ...listDockAvailableCommands()];
}
//#endregion
export { getAvailableCommands };