SIGN IN SIGN UP

fix: remove flattenSingleChild/promoteMainEntry from CapturingToken (#4701)

XtabProvider entries appeared unnested at the top level when the
sibling NES MarkdownContentRequest entry was hidden (via setIsSkipped
or cancellation). This happened because flattenSingleChild promoted
the sole remaining child to the top level.

Instead of adding the log context document as a child that gets
'promoted' into the parent, ChatPromptItem now directly owns the
document via setMainEntry(). A MarkdownContentRequest whose debugName
matches the token label is wired to the parent's icon and click
command — never added as a tree child. Groups with no visible
children render as non-expandable leaf items.

This removes flattenSingleChild and promoteMainEntry from
CapturingToken, making it a pure correlation token with no
rendering hints. The tree view owns all rendering conventions.
U
Ulugbek Abdullaev committed
e47502f50992452926590e8a4f00e70ca0c110a6
Parent: 767e044
Committed by GitHub <noreply@github.com> on 3/26/2026, 5:40:30 PM