Public declaration syntax from forge-swift/Sources/ForgeCore/Message.swift Original source SHA-256: 49a7a4d70356de9d72adaa7eb930e4fc675c63d7ca4d1e9c7b69c8b59da4461d Function bodies and constant values are omitted. This is not the complete implementation. Source line 24 public enum Role: String, Codable, Sendable, Hashable, CaseIterable Source line 36 public var description: String Source line 47 public enum MessagePart: Sendable, Equatable Source line 60 public var isToolCall: Bool Source line 66 public var isToolResult: Bool Source line 74 public var asText: String? Source line 89 public init(from decoder: Decoder) throws Source line 121 public func encode(to encoder: Encoder) throws Source line 154 public struct ModelMessage: Codable, Sendable, Equatable Source line 156 public let role: Role /// One or more content parts. public var parts: [MessagePart] /// Creates a new message with the given role and content parts. /// /// - Parameters: /// - role: The message participant role. /// - parts: One or more content parts. public init(role: Role, parts: [MessagePart]) Source line 158 public var parts: [MessagePart] /// Creates a new message with the given role and content parts. /// /// - Parameters: /// - role: The message participant role. /// - parts: One or more content parts. public init(role: Role, parts: [MessagePart]) Source line 165 public init(role: Role, parts: [MessagePart]) Source line 177 public static func text(_ role: Role, _ text: String) -> ModelMessage Source line 184 public func toolCalls() -> [MessagePart] Source line 193 public func textContent() -> String