Update LiteRT-LM implementation with accurate iOS status

- Document that Swift APIs are 'coming soon' per Google
- Add C++ bridge integration guide
- Create stub implementation that explains current limitations
- Add LITERT_IOS_STATUS.md with detailed integration options
- Fix MainViewModel to match MainView property expectations
This commit is contained in:
2026-04-06 14:33:50 +02:00
parent bbcf0c74bb
commit d16fb2b931
4 changed files with 508 additions and 184 deletions
@@ -16,6 +16,12 @@ class MainViewModel: ObservableObject {
@Published var conversations: [ConversationInfo] = []
@Published var currentConversationId: UUID = UUID()
// Computed properties for view state
var isLoading: Bool { isGenerating && currentResponse.isEmpty }
var isProcessing: Bool { isGenerating }
var isExecutingTool: Bool { false } // TODO: Implement tool execution state
var streamingText: String { currentResponse }
private let agent: Agent
private let audioRecorder: AudioRecorder
private let ttsService: TtsService
@@ -41,6 +47,11 @@ class MainViewModel: ObservableObject {
await processTextMessage(text)
}
func sendMessage(text: String) async {
guard !text.isEmpty else { return }
await processTextMessage(text)
}
func sendImage(_ image: UIImage, text: String = "") async {
selectedImage = image
let displayText = text.isEmpty ? "[Image]" : text
@@ -156,6 +167,11 @@ class MainViewModel: ObservableObject {
errorMessage = message
showError = true
}
func dismissError() {
showError = false
errorMessage = nil
}
}
struct ConversationInfo: Identifiable {