// // ChatModels.swift // Poche // // Author: Simon-Pierre Boucher // Contact: contact@spboucher.ai // import Foundation /// One turn of the visible conversation thread. /// A refusal or a failure is a normal turn state, never an error screen /// (CLAUDE.md §2 — guardrails). struct ChatTurn: Identifiable, Sendable { enum Role: Sendable { case user case assistant /// App-generated notices (confirmed action, cancelled proposal). case system } enum Status: Sendable { case streaming case complete case refused case failed } let id = UUID() let role: Role var text: String var status: Status }