UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

2 lines • 1.04 kB
//!src/agents/agent-terminal-snapshot.ts const selectedAgentTerminal=Symbol(`openclaw.selectedAgentTerminal`);function withAgentTerminalSnapshot(e,t){if(e instanceof Error&&Object.isExtensible(e))Object.defineProperty(e,selectedAgentTerminal,{value:t,configurable:true});return e}function readAgentTerminalSnapshot(e){if(!(e instanceof Error)||!Object.isExtensible(e))return;const t=e;return Object.hasOwn(t,selectedAgentTerminal)?t[selectedAgentTerminal]:void 0}const selectedPayloadTerminal=Symbol(`openclaw.selectedPayloadTerminal`);function withAgentTerminalPayloadSnapshot(e,t){if(Object.isExtensible(e))Object.defineProperty(e,selectedPayloadTerminal,{value:t,configurable:true});return e}function readAgentTerminalPayloadSnapshot(e){if(!e||typeof e!==`object`||!Object.isExtensible(e))return;const t=e;return Object.hasOwn(t,selectedPayloadTerminal)?t[selectedPayloadTerminal]:void 0}export{withAgentTerminalSnapshot as i,readAgentTerminalSnapshot as n,withAgentTerminalPayloadSnapshot as r,readAgentTerminalPayloadSnapshot as t};