feat: collapse-all button in float transcript titlebar

Add titlebar button to collapse all conversation sections except the
last user message. Special user messages (interrupted, meta/continue)
are treated as section children rather than section leaders.
This commit is contained in:
2026-02-20 12:53:18 -06:00
parent 220d595568
commit 779e32b283
17 changed files with 69 additions and 7080 deletions

View File

@@ -606,6 +606,19 @@ onBeforeUnmount(() => {
<rect x="1" y="1" width="8" height="8" fill="currentColor"/>
</svg>
</button>
<button
@click.stop="chatRef?.collapseAllExceptLast()"
:class="{ active: chatRef?.allCollapsed }"
class="collapse-all-btn"
title="Collapse all except last"
>
<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline v-if="chatRef?.allCollapsed" points="6 9 12 15 18 9"/>
<template v-else>
<polyline points="18 15 12 9 6 15"/>
</template>
</svg>
</button>
<button @click.stop="chatRef?.toggleSelectMode()" :class="{ active: chatRef?.selectMode }" title="Select messages">
<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline v-if="chatRef?.selectMode" points="20 6 9 17 4 12"/>
@@ -963,6 +976,22 @@ onBeforeUnmount(() => {
color: #c4b5fd;
}
.window-controls .collapse-all-btn {
color: #2dd4bf;
}
.window-controls .collapse-all-btn:hover {
color: #5eead4;
background: rgba(45, 212, 191, 0.15);
border-color: rgba(45, 212, 191, 0.25);
}
.window-controls .collapse-all-btn.active {
background: rgba(45, 212, 191, 0.2);
border-color: rgba(45, 212, 191, 0.3);
color: #5eead4;
}
.window-controls .size-btn {
color: #0ea5e9;
}