Last active
April 12, 2024 02:36
-
-
Save apatronl/0b9d3bb24bc80ffde970cb60061dc6f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ChatMessagesList: View { | |
@Bindable var viewModel: ChatViewModel | |
var body: some View { | |
ScrollView { | |
ForEach(viewModel.messages) { message in | |
MessageCell(message: message) | |
.padding(message.role.padding) | |
} | |
} | |
.defaultScrollAnchor(.bottom) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment