UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

31 lines (30 loc) • 923 B
//#region src/auto-reply/reply/acp-stream-settings.ts const ACP_TAG_VISIBILITY_DEFAULTS = { agent_message_chunk: true, tool_call: false, tool_call_update: false, usage_update: false, available_commands_update: false, current_mode_update: false, config_option_update: false, session_info_update: false, plan: false, agent_thought_chunk: false }; function isAcpSessionUpdateTag(e) { return Object.hasOwn(ACP_TAG_VISIBILITY_DEFAULTS, e); } function resolveAcpProjectionSettings(e) { const t = e.acp?.stream; return { deliveryMode: t?.deliveryMode === "live" ? "live" : "final_only", repeatSuppression: t?.repeatSuppression !== false, tagVisibility: t?.tagVisibility ?? {} }; } function isAcpTagVisible(e, t) { if (!t || !isAcpSessionUpdateTag(t)) return true; return e.tagVisibility[t] ?? ACP_TAG_VISIBILITY_DEFAULTS[t]; } //#endregion export { resolveAcpProjectionSettings as n, isAcpTagVisible as t };