Current section

Files

Jump to
opencode_sdk lib opencode generated session_message_user.ex
Raw

lib/opencode/generated/session_message_user.ex

defmodule OpenCode.Generated.SessionMessageUser do
@moduledoc """
Provides struct and type for a SessionMessageUser
"""
@type t :: %__MODULE__{
agents: [OpenCode.Generated.PromptAgentAttachment.t()] | nil,
files: [OpenCode.Generated.PromptFileAttachment.t()] | nil,
id: String.t(),
metadata: map | nil,
references: [OpenCode.Generated.PromptReferenceAttachment.t()] | nil,
text: String.t(),
time: OpenCode.Generated.SessionMessageUserTime.t(),
type: String.t()
}
defstruct [:agents, :files, :id, :metadata, :references, :text, :time, :type]
@doc false
@spec __fields__(atom) :: keyword
def __fields__(type \\ :t)
def __fields__(:t) do
[
agents: [{OpenCode.Generated.PromptAgentAttachment, :t}],
files: [{OpenCode.Generated.PromptFileAttachment, :t}],
id: :string,
metadata: :map,
references: [{OpenCode.Generated.PromptReferenceAttachment, :t}],
text: :string,
time: {OpenCode.Generated.SessionMessageUserTime, :t},
type: {:const, "user"}
]
end
end