Jido.Chat.ReplyContext (Jido Chat v1.2.0)

Copy Markdown View Source

Shallow quoted-message context preserved with a message reply.

This is intentionally not a nested message. It contains only the quoted message ID, provider ID, text, and author fields that providers can supply without lookup.

Summary

Functions

Builds a reply context from serialized map data.

Creates a shallow reply context from map input.

Returns the Zoi schema for ReplyContext.

Serializes the reply context with a revivable type marker.

Types

t()

@type t() :: %Jido.Chat.ReplyContext{
  author:
    nil
    | nil
    | %Jido.Chat.Author{
        email: term(),
        full_name: term(),
        id: term(),
        is_bot: term(),
        is_me: term(),
        is_system: term(),
        metadata: term(),
        user_id: term(),
        user_name: term()
      },
  external_message_id: nil | nil | any(),
  id: nil | nil | binary(),
  text: nil | nil | binary()
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Builds a reply context from serialized map data.

new(attrs)

@spec new(map()) :: t()

Creates a shallow reply context from map input.

schema()

Returns the Zoi schema for ReplyContext.

to_map(context)

@spec to_map(t()) :: map()

Serializes the reply context with a revivable type marker.