- Restructure project into three targets: - AppleIntelligenceCore: Shared gRPC service code - AppleIntelligenceServer: CLI server - AppleIntelligenceApp: Menu bar app - Menu bar app features: - Toggle server on/off from menu bar - Chat window with streaming AI responses - Settings: host, port, API key, auto-start, launch at login - Proper window focus handling for menu bar apps - Add build scripts for distribution: - build-app.sh: Creates signed .app bundle - create-dmg.sh: Creates distributable DMG 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
23 lines
478 B
Swift
23 lines
478 B
Swift
import Foundation
|
|
|
|
struct ChatMessage: Identifiable, Equatable {
|
|
let id: UUID
|
|
let role: Role
|
|
var content: String
|
|
let timestamp: Date
|
|
var isStreaming: Bool
|
|
|
|
enum Role: Equatable {
|
|
case user
|
|
case assistant
|
|
}
|
|
|
|
init(role: Role, content: String, isStreaming: Bool = false) {
|
|
self.id = UUID()
|
|
self.role = role
|
|
self.content = content
|
|
self.timestamp = Date()
|
|
self.isStreaming = isStreaming
|
|
}
|
|
}
|