The message text to split, as it appears in Message.content.
The parts in the order they appear in content: a single text part when there is no
markup to find, and an empty array for an empty string.
import { parseMessageParts } from '@d-id/client-sdk';
parseMessageParts('Here it is:  — enjoy!');
// [
// { type: 'text', text: 'Here it is: ' },
// { type: 'image', src: 'https://example.com/cat.png', alt: 'a cat' },
// { type: 'text', text: ' — enjoy!' },
// ]
Splits a message's text into the typed parts a UI can render.
The SDK already runs it over every message it builds and keeps the result on Message.parts, so this is for content that comes from somewhere else — a transcript you render outside the SDK, or text you assembled before handing it to a renderer. initialMessages no longer need it: pass
parts: []and the SDK runs this for you. It recognizes markdown images (), the video thumbnail form ([](video)), markdown links ([label](url)) and HTML anchors (<a href="url">label</a>); an image whose URL looks like a video becomes avideopart instead, and a GIF is tagged with amimeType, both under the rules MessagePart sets out. Everything the parser does not recognize is preserved verbatim as atextpart, in its original order, and nothing is dropped or reordered; each recognized part replaces the markup it was written as, so the parts are not a concatenation of the input.