File tree Expand file tree Collapse file tree 3 files changed +7
-13
lines changed
FirebaseAIExample.xcodeproj Expand file tree Collapse file tree 3 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 687687 isa = XCRemoteSwiftPackageReference;
688688 repositoryURL = "https://github.com/gonzalezreal/swift-markdown-ui";
689689 requirement = {
690- kind = revision ;
691- revision = 55441810c0f678c78ed7e2ebd46dde89228e02fc ;
690+ kind = upToNextMajorVersion ;
691+ minimumVersion = 2.4.0 ;
692692 };
693693 };
694694 DEA09AC32B1FCE22001962D9 /* XCRemoteSwiftPackageReference "NetworkImage" */ = {
695695 isa = XCRemoteSwiftPackageReference;
696696 repositoryURL = "https://github.com/gonzalezreal/NetworkImage";
697697 requirement = {
698- kind = revision ;
699- revision = 7aff8d1b31148d32c5933d75557d42f6323ee3d1 ;
698+ kind = upToNextMajorVersion ;
699+ minimumVersion = 6.0.0 ;
700700 };
701701 };
702702 DEFECAAB2D7BB49700EF9621 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import Foundation
1616import SwiftUI
1717import PhotosUI
1818import FirebaseAI
19+ import ConversationKit
1920
2021public enum MultimodalAttachmentError : LocalizedError {
2122 case unsupportedFileType( extension: String )
@@ -38,7 +39,7 @@ public enum MultimodalAttachmentError: LocalizedError {
3839}
3940
4041// MultimodalAttachment is a struct used for transporting data between ViewModels and AttachmentPreviewCard
41- public struct MultimodalAttachment : Identifiable , Equatable , Hashable {
42+ public struct MultimodalAttachment : Attachment , Equatable {
4243 public let id = UUID ( )
4344 public let mimeType : String
4445 public let data : Data ?
Original file line number Diff line number Diff line change @@ -35,16 +35,10 @@ struct MultimodalScreen: View {
3535 sample: sample) )
3636 }
3737
38- private var attachmentPreviewScrollView : some View {
39- AttachmentPreviewScrollView (
40- attachments: viewModel. attachments,
41- onAttachmentRemove: viewModel. removeAttachment
42- )
43- }
44-
4538 var body : some View {
4639 NavigationStack {
4740 ConversationView ( messages: $viewModel. messages,
41+ attachments: $viewModel. attachments,
4842 userPrompt: viewModel. initialPrompt) { message in
4943 MessageView ( message: message)
5044 }
@@ -59,7 +53,6 @@ struct MultimodalScreen: View {
5953 Label ( " Photo " , systemImage: " photo.on.rectangle.angled " )
6054 }
6155 }
62- . attachmentPreview { attachmentPreviewScrollView }
6356 . onSendMessage { message in
6457 await viewModel. sendMessage ( message. content ?? " " , streaming: true )
6558 }
You can’t perform that action at this time.
0 commit comments