Skip to content

MessagePart

🛈 DocStrings

A part of a message (text, code, file, etc.).

Source code in src/anyenv/text_sharing/opencode.py
@dataclass
class MessagePart:
    """A part of a message (text, code, file, etc.)."""

    type: Literal["text"]
    """Part type - currently only 'text' is supported."""

    text: str
    """Text content of the part."""

text instance-attribute

text: str

Text content of the part.

type instance-attribute

type: Literal['text']

Part type - currently only 'text' is supported.

:fa-brands-github: Show source on GitHub