Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/frontend/packages/swarm-ui/test/badge-titles.test.mjs
iris 3a846c8c45 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).
2026-11-17 06:49:03 +01:00

28 lines
937 B
JavaScript

// The model badge's tooltip. Run by `npm test`, which Node runs with its
// built-in test runner and type stripping.
import assert from "node:assert/strict";
import { test } from "node:test";
import { inferenceTitle } from "../src/agent/state/badge-titles.ts";
test("the tooltip says what the alias resolved to and where the effort comes from", () => {
assert.equal(
inferenceTitle("claude-x-1", "swarm", false),
"resolved to claude-x-1; effort set by: swarm",
);
});
test("an alias that did not resolve leaves that part out", () => {
for (const resolved of [undefined, null, ""]) {
assert.equal(
inferenceTitle(resolved, "default", false),
"effort set by: default",
);
}
});
test("a clickable badge says it opens the settings", () => {
assert.equal(
inferenceTitle("claude-x-1", "swarm", true),
"resolved to claude-x-1; effort set by: swarm. Click for the inference settings",
);
});