diff --git a/app/src/main/kotlin/top/yeij/cyrene/ui/chat/MessageBubble.kt b/app/src/main/kotlin/top/yeij/cyrene/ui/chat/MessageBubble.kt index d948ae8..2b89bc4 100644 --- a/app/src/main/kotlin/top/yeij/cyrene/ui/chat/MessageBubble.kt +++ b/app/src/main/kotlin/top/yeij/cyrene/ui/chat/MessageBubble.kt @@ -54,7 +54,12 @@ fun MessageBubble(message: HistoryMessageDto) { horizontalAlignment = if (isUser) Alignment.End else Alignment.Start, verticalArrangement = Arrangement.spacedBy(6.dp), ) { - // 来源角标放在消息组顶部,明确标注下面这一组气泡来自哪里 + bubbles.forEach { bubble -> + AnnotationLine(bubble.head) + if (bubble.body.isNotEmpty()) BubbleBody(bubble.body, isUser) + AnnotationLine(bubble.tail) + } + // 来源角标挂在消息组末尾,紧随它标注的那条消息(主人右下、昔涟左下) if (source != null) { Text( text = source, @@ -63,11 +68,6 @@ fun MessageBubble(message: HistoryMessageDto) { modifier = Modifier.padding(start = 6.dp, end = 6.dp), ) } - bubbles.forEach { bubble -> - AnnotationLine(bubble.head) - if (bubble.body.isNotEmpty()) BubbleBody(bubble.body, isUser) - AnnotationLine(bubble.tail) - } } }