UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 880 B
import{t as isCommandFlagEnabled}from"./commands.flags-BdxOktqL.mjs";import{t as getChatCommands}from"./commands-registry.data-IaSrmBM9.mjs"; //!src/auto-reply/commands-registry-list.ts function listChatCommands(e){const t=[...getChatCommands()];for(const n of e?.skillCommands??[]){const e={key:`skill:${n.skillName}`,nativeName:n.name,description:n.description,textAliases:[`/${n.name}`],acceptsArgs:true,argsParsing:`none`,scope:`both`,category:`tools`};if(n.descriptionLocalizations)e.descriptionLocalizations=n.descriptionLocalizations;t.push(e)}return t}function isCommandEnabled(e,t){return t===`config`||t===`mcp`||t===`plugins`||t===`debug`||t===`bash`?isCommandFlagEnabled(e,t):true}function listChatCommandsForConfig(e,t){return listChatCommands(t).filter(t=>isCommandEnabled(e,t.key))}export{listChatCommands as n,listChatCommandsForConfig as r,isCommandEnabled as t};