UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 1.16 kB
import"./session-key-BPgKfU2m.mjs";import{n as normalizeAccountId}from"./account-id-3yqrEsRn.mjs";import{t as normalizeAnyChannelId}from"./registry-normalize-BP0gv89S.mjs";import{n as getLoadedChannelPlugin}from"./registry-CpNh6QcT.mjs";import{r as resolveChannelAccountEntry}from"./account-lookup-DXbrh7Os.mjs";import"./plugins-DxOycUNJ.mjs"; //!src/config/markdown-tables.ts const isMarkdownTableMode=e=>e===`off`||e===`bullets`||e===`code`||e===`block`;function resolveMarkdownModeFromSection(e,t,n){if(!e)return;const r=normalizeAccountId(n);const i=e.accounts;if(i&&typeof i===`object`){const e=resolveChannelAccountEntry(i,r,t)?.markdown?.tables;if(isMarkdownTableMode(e))return e}const a=e.markdown?.tables;return isMarkdownTableMode(a)?a:void 0}function resolveMarkdownTableMode(e){const t=normalizeAnyChannelId(e.channel)??e.channel?.trim().toLowerCase();const n=t?getLoadedChannelPlugin(t)?.messaging?.defaultMarkdownTableMode??`code`:`code`;let r=n;if(t&&e.cfg){const i=e.cfg.channels;const a=e.cfg;r=resolveMarkdownModeFromSection(i?.[t]??a[t],t,e.accountId)??n}return r===`block`&&!e.supportsBlockTables?`code`:r}export{resolveMarkdownTableMode as t};