feat(onboarding): hide kickoff bubble and tweak typing

This commit is contained in:
Peter Steinberger
2025-12-20 19:46:06 +00:00
parent 09d2165d36
commit 52a2dfe08b
2 changed files with 19 additions and 7 deletions

View File

@@ -69,7 +69,7 @@ public struct ClawdisChatView: View {
ScrollViewReader { proxy in
ScrollView {
LazyVStack(spacing: Layout.messageSpacing) {
ForEach(self.viewModel.messages) { msg in
ForEach(self.visibleMessages) { msg in
ChatMessageBubble(message: msg)
.frame(
maxWidth: .infinity,
@@ -77,7 +77,7 @@ public struct ClawdisChatView: View {
}
if self.viewModel.pendingRunCount > 0 {
ChatTypingIndicatorBubble()
ChatTypingIndicatorBubble(style: self.style)
.frame(maxWidth: .infinity, alignment: .leading)
}
@@ -111,4 +111,11 @@ public struct ClawdisChatView: View {
}
}
}
private var visibleMessages: [ClawdisChatMessage] {
guard self.style == .onboarding else { return self.viewModel.messages }
guard let first = self.viewModel.messages.first else { return [] }
guard first.role.lowercased() == "user" else { return self.viewModel.messages }
return Array(self.viewModel.messages.dropFirst())
}
}