component
TuxBranchNav
‹ N of M › navigator for response alternatives. When the model produces multiple candidates for the same prompt (regeneration / branching), surface a small prev/next pair so users can cycle. Position is rendered as text so screen readers announce the change. Lives well in TuxChatMessage's #header-trailing slot. basic
Three alternatives
v-model is 1-indexed. At the start, the prev button is disabled; at the end, next is disabled.
current: 2
<tux-branch-nav v-model="current" :total="3" />wrap
Loop at the ends
Pass loop to wrap around at both ends. Use when the alternates form a cycle (e.g., circular regeneration history).
<tux-branch-nav v-model="current" :total="5" loop />singleton
Hidden when N = 1
Default behavior: a single response doesn't need a nav, so the component renders nothing. Pass :hide-singleton="false" to force render.
(renders nothing →)← only one branch
<tux-branch-nav v-model="current" :total="1" />
<!-- Renders nothing — hideSingleton defaults true so a single response
doesn't get a useless nav. Pass :hide-singleton="false" to force. -->