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

@@ -120,15 +120,20 @@ private struct AttachmentRow: View {
@MainActor
struct ChatTypingIndicatorBubble: View {
let style: ClawdisChatView.Style
var body: some View {
HStack(spacing: 10) {
TypingDots()
Text("Clawd is thinking…")
.font(.subheadline)
.foregroundStyle(.secondary)
Spacer()
if self.style == .standard {
Text("Clawd is thinking…")
.font(.subheadline)
.foregroundStyle(.secondary)
Spacer()
}
}
.padding(12)
.padding(.vertical, self.style == .standard ? 12 : 10)
.padding(.horizontal, self.style == .standard ? 12 : 14)
.background(
RoundedRectangle(cornerRadius: 16, style: .continuous)
.fill(ClawdisChatTheme.assistantBubble))

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())
}
}