using System.Collections.Generic;

namespace AIRuntime.Runtime.Models
{
    /// <summary>
    /// Represents a single message inside a conversation.
    /// </summary>
    public sealed class ConversationMessage
    {
        /// <summary>
        /// Message role.
        /// user
        /// assistant
        /// tool
        /// </summary>
        public string Role { get; set; }

        /// <summary>
        /// Text content of the message.
        /// Empty when the assistant is requesting capabilities.
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// Assistant capability requests.
        /// Only populated for assistant messages that request capabilities.
        /// </summary>
        public List<ToolCall> ToolCalls { get; set; }

        /// <summary>
        /// ID of the capability call this tool message responds to.
        /// Only used for Role == "tool".
        /// </summary>
        public string ToolCallId { get; set; }

        /// <summary>
        /// Capability name.
        /// Only used for tool result messages.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Durable non-text artifacts emitted by a capability. Image-bearing
        /// requests require explicitly configured image input support; unsupported
        /// providers are skipped without dropping the evidence. Binary data is
        /// not embedded in execution memory.
        /// </summary>
        public List<ConversationAttachment> Attachments { get; set; }
    }


    public sealed class ConversationAttachment
    {
        public string Kind { get; set; }
        public string Path { get; set; }
        public string MediaType { get; set; }
        public string Sha256 { get; set; }
        public long Bytes { get; set; }
    }
}
