openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 792 B
JavaScript
import{t as isCommandEnabled}from"./commands-registry-list-BUUc31nC.mjs";import{t as shouldHandleTextCommands}from"./commands-text-routing-CDTqRuxF.mjs";import{n as resolveCommandContextText}from"./context-text-0KLy58TB.mjs";import{t as hasControlCommand}from"./command-detection-Cg03lzSK.mjs";
//!src/auto-reply/reply/dispatch-acp-command-bypass.ts
function shouldBypassAcpDispatchForCommand(e,t){const n=resolveCommandContextText(e);if(!n)return false;const r=shouldHandleTextCommands({cfg:t,surface:e.Surface??e.Provider??``,commandSource:e.CommandSource});if(/^\/(?:new|reset|acp)(?:\s|$)/i.test(n))return true;if(hasControlCommand(n,t))return r;if(!n.startsWith(`!`)||!e.CommandAuthorized||!isCommandEnabled(t,`bash`))return false;return r}export{shouldBypassAcpDispatchForCommand as t};