fix(#1368): highlight chat search hits in inline spans, code blocks and reasoning (#1372)

This commit is contained in:
m57
2026-09-29 01:01:13 +03:00
committed by GitHub
parent c7134832c9
commit 4f14ecac4b
7 changed files with 118 additions and 9 deletions
@@ -40,6 +40,22 @@ class FullBleedItemKeysTest {
assertEquals(3, searchMatchToLazyIndex(turns, messages, SearchMatch(2, 0)))
}
@Test
fun secondaryReasoningResolvesToItsProseRow() {
val messages =
listOf(
ChatMessage("a1", MessageRole.ASSISTANT, "one", reasoningText = "first"),
ChatMessage("a2", MessageRole.ASSISTANT, "two", reasoningText = "second"),
)
val turns = groupIntoTurns(messages)
val keys = fullBleedItemKeys(turns)
assertEquals(
keys.indexOf("prose-a2"),
searchMatchToLazyIndex(turns, messages, SearchMatch(1, 0, SearchTarget.REASONING)),
)
}
@Test
fun toolAnchorSurvivesPrependThatExtendsItsAgentTurn() {
val tool = ChatMessage("live-tool", MessageRole.TOOL, "output")