feat: render display_kind timeline markers as chips, not user bubbles (#904) (#909)

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
M57andM57 authored and GitHub committed 2026-08-15 14:06:51 +03:00
1 parent 85087c70c7
commit 4be1e965f2
16 files changed
+438 -11

No files matched your search

@@ -161,4 +161,36 @@ class ChatMessageMapperTest {
assertEquals("r", roundTripped.reasoningText)
}
@Test
fun roundTripPreservesDisplayKind() {
val ui =
ChatMessage(
id = "msg-4",
role = MessageRole.USER,
content = "[System: ...changed to gpt-5...]",
displayKind = "model_switch",
timestamp = 4000L,
)
val roundTripped = ui.toEntity("s").toUiModel()
assertEquals("model_switch", roundTripped.displayKind)
assertEquals(MessageRole.USER, roundTripped.role)
}
@Test
fun roundTripWithoutDisplayKindStaysNull() {
val ui =
ChatMessage(
id = "msg-5",
role = MessageRole.USER,
content = "plain user text",
timestamp = 5000L,
)
val roundTripped = ui.toEntity("s").toUiModel()
assertNull(roundTripped.displayKind)
}
}