swarm ui: the terminal's status badges overhaul
The connection is a light on the agent's icon instead of a "live" badge, the model and the effort are one badge, the context badge has an icon, subagents and a new bash tasks badge are an icon and a count, and an agent's tab shows a drag grip on hover. It also removes two things the overhaul replaces: the cost badge, and the "split" badge with its menu in group panes (splitting is by dragging a tab, or from the subagents list).
This commit is contained in:
parent
e9e71a09ac
commit
3a846c8c45
1 changed files with 430 additions and 199 deletions
|
|
@ -75,6 +75,11 @@ export interface BadgeProps {
|
|||
disabled?: boolean;
|
||||
class?: string;
|
||||
title?: string;
|
||||
/**
|
||||
* The accessible name, when the visible text is not enough of one: a badge that
|
||||
* is an icon and a number, say.
|
||||
*/
|
||||
ariaLabel?: string;
|
||||
}
|
||||
|
||||
export function Badge({
|
||||
|
|
@ -88,6 +93,7 @@ export function Badge({
|
|||
disabled,
|
||||
class: extraClass,
|
||||
title,
|
||||
ariaLabel,
|
||||
}: BadgeProps) {
|
||||
// `disabled` alone still means "button, just not clickable right
|
||||
// now" — see the prop's own doc above for why this can't just check
|
||||
|
|
@ -123,6 +129,7 @@ export function Badge({
|
|||
onClick={onClick}
|
||||
disabled={disabled}
|
||||
aria-expanded={expanded}
|
||||
aria-label={ariaLabel}
|
||||
title={title}
|
||||
>
|
||||
{content}
|
||||
|
|
@ -130,7 +137,7 @@ export function Badge({
|
|||
);
|
||||
}
|
||||
return (
|
||||
<span class={classes} title={title}>
|
||||
<span class={classes} title={title} aria-label={ariaLabel}>
|
||||
{content}
|
||||
</span>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue