Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Chowder/Chowder/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,13 @@
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSMicrophoneUsageDescription</key>
<string>Chowder uses the microphone for voice input so you can speak your messages.</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>Chowder uses speech recognition to transcribe your voice into text messages.</string>
<key>NSCameraUsageDescription</key>
<string>Chowder uses the camera to take photos for the agent to analyze.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Chowder accesses your photo library to send images to the agent.</string>
</dict>
</plist>
4 changes: 3 additions & 1 deletion Chowder/Chowder/Models/Message.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ struct Message: Identifiable, Codable {
let role: MessageRole
var content: String
let timestamp: Date
var imageData: Data?

init(id: UUID = UUID(), role: MessageRole, content: String, timestamp: Date = Date()) {
init(id: UUID = UUID(), role: MessageRole, content: String, timestamp: Date = Date(), imageData: Data? = nil) {
self.id = id
self.role = role
self.content = content
self.timestamp = timestamp
self.imageData = imageData
}
}
22 changes: 22 additions & 0 deletions Chowder/Chowder/Models/SavedSession.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Foundation

struct SavedSession: Identifiable, Codable, Equatable {
let id: UUID
var key: String // e.g. "agent:main:main"
var label: String // user-friendly label e.g. "Main", "Research"
var lastUsed: Date
var messageCount: Int

init(id: UUID = UUID(), key: String, label: String, lastUsed: Date = Date(), messageCount: Int = 0) {
self.id = id
self.key = key
self.label = label
self.lastUsed = lastUsed
self.messageCount = messageCount
}

/// Default session matching the app's initial config.
static var defaultSession: SavedSession {
SavedSession(key: "agent:main:main", label: "Main")
}
}
Loading