Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.
Python agent-orchestrationaiai-agentschatopsdiscordlangchainmcpmicrosoft-teamsmulti-agentopen-sourceopenaiself-hostedslack
export function coerceRawSvgContent(payload: unknown): string | undefined {
if (typeof payload === 'string') {
return payload;
}
if (
payload &&
typeof payload === 'object' &&
'default' in payload &&
typeof payload.default === 'string'
) {
return payload.default;
}
return undefined;
}
export function prepareInlineSvgMarkup(svgContent: string): string {
return svgContent
.replace(/\swidth="[^"]*"/g, '')
.replace(/\sheight="[^"]*"/g, '')
.replace(/<style>[\s\S]*?<\/style>/g, '')
.replace('<svg ', '<svg fill="currentColor" class="h-full w-full" ');
}