SPB Git

spb/poche Public

Agent personnel 100 % on-device — SwiftUI + Apple Foundation Models + EventKit + SwiftData. Aucune API, aucun serveur.

Swift 100%
702 B · 34 lines swift
Raw Blame History
1//2//  ChatModels.swift3//  Poche4//5//  Author:  Simon-Pierre Boucher6//  Contact: contact@spboucher.ai7//89import Foundation1011/// One turn of the visible conversation thread.12/// A refusal or a failure is a normal turn state, never an error screen13/// (CLAUDE.md §2 — guardrails).14struct ChatTurn: Identifiable, Sendable {15    enum Role: Sendable {16        case user17        case assistant18        /// App-generated notices (confirmed action, cancelled proposal).19        case system20    }2122    enum Status: Sendable {23        case streaming24        case complete25        case refused26        case failed27    }2829    let id = UUID()30    let role: Role31    var text: String32    var status: Status33}34