diff --git a/frontend/src/lib/components/copilot/chat/ChatCollapsibleCard.svelte b/frontend/src/lib/components/copilot/chat/ChatCollapsibleCard.svelte index 9bb2aacf2d..e5a9989365 100644 --- a/frontend/src/lib/components/copilot/chat/ChatCollapsibleCard.svelte +++ b/frontend/src/lib/components/copilot/chat/ChatCollapsibleCard.svelte @@ -4,6 +4,7 @@ import { fade, slide } from 'svelte/transition' import type { Snippet } from 'svelte' import { HeldValue, LABEL_MIN_MS } from './heldValue.svelte' + import Tooltip from '$lib/components/meltComponents/Tooltip.svelte' interface Props { label: string @@ -12,6 +13,8 @@ * label weight, because a caller emphasising the label is also setting a proportional * typeface, whose medium reads heavier than the mono one at this size. */ labelPrefix?: string + /** Parts left out of the label, shown as `+N` after it and listed on hover. */ + labelMore?: string[] expanded: boolean onToggle: () => void // A card with nothing to reveal keeps the header inert (no chevron, no @@ -43,6 +46,7 @@ let { label, labelPrefix, + labelMore, expanded, onToggle, toggleable = true, @@ -63,11 +67,11 @@ // right after its last status would show the running label, shimmer or line beside the // settled others. const held = new HeldValue( - () => ({ prefix: labelPrefix, label, shimmer, liveLine }), + () => ({ prefix: labelPrefix, label, more: labelMore, shimmer, liveLine }), () => (settleLabel ? LABEL_MIN_MS : 0) ) const shown = $derived( - settleLabel ? held.current : { prefix: labelPrefix, label, shimmer, liveLine } + settleLabel ? held.current : { prefix: labelPrefix, label, more: labelMore, shimmer, liveLine } ) @@ -88,7 +92,7 @@ {#snippet headerButton()}