ios: better fix for scroll

This commit is contained in:
2026-05-02 22:25:24 -07:00
parent 2da73f802c
commit 4b0cc3fbf7
2 changed files with 15 additions and 2 deletions

View File

@@ -24,6 +24,16 @@ struct SybilWorkspaceView: View {
viewModel.errorMessage != nil
}
private var transcriptScrollContextID: String {
if viewModel.draftKind == .chat {
return "draft-chat"
}
if case let .chat(chatID) = viewModel.selectedItem {
return "chat:\(chatID)"
}
return "chat:none"
}
var body: some View {
VStack(spacing: 0) {
if showsHeader {
@@ -53,6 +63,7 @@ struct SybilWorkspaceView: View {
isLoading: viewModel.isLoadingSelection,
isSending: viewModel.isSending
)
.id(transcriptScrollContextID)
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)