This commit is contained in:
ishaan-berri 2026-10-17 08:01:47 -07:00 • committed by GitHub
commit c5c14b95df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 0 deletions

View file

@ -50,6 +50,16 @@ describe("isUserAgentTag", () => {
});
describe("topAgents", () => {
it("recognises Moyai as an agent and keeps it in the agent group", () => {
const agents = topAgents([row("User-Agent: Moyai", 5, 900), row("User-Agent: python", 10, 1000)]);
const agentGroup = agents.filter((agent) => agent.kind === "agent");
const sdkGroup = agents.filter((agent) => agent.kind === "sdk");
const moyai = { id: "moyai", label: "Moyai", kind: "agent", tokens: 900 };
expect(agentGroup[0]).toMatchObject(moyai);
expect(agentGroup[0].logo).toBeTruthy();
expect(sdkGroup[0]).toMatchObject({ id: "python", kind: "sdk" });
});
it("counts a product from its bare rollup row, not again from its versioned children", () => {
const agents = topAgents([
row("User-Agent: python", 100, 1000),

View file

@ -5,6 +5,7 @@ import githubLogo from "../../../../../../../public/assets/logos/github.svg";
import hermesLogo from "../../../../../../../public/assets/logos/hermes.png";
import langchainLogo from "../../../../../../../public/assets/logos/langchain.svg";
import litellmLogo from "../../../../../../../public/assets/logos/litellm_monogram.svg";
import moyaiLogo from "../../../../../../../public/assets/moyai/moyai-head.svg";
import openaiLogo from "../../../../../../../public/assets/logos/openai_small.svg";
import openaiAgentsLogo from "../../../../../../../public/assets/logos/openai-agents.svg";
import opencodeLogo from "../../../../../../../public/assets/moyai/logos/opencode.svg";
@ -48,6 +49,14 @@ interface AgentFamily {
* mark as in the Lens trace view; Claude Code gets its own spark tile rather than Anthropic's wordmark.
*/
const FAMILIES: readonly AgentFamily[] = [
{
id: "moyai",
label: "Moyai",
description: "Cloud coding agent",
kind: "agent",
logo: moyaiLogo.src,
match: /^moyai\b/i,
},
{
id: "claude-code",
label: "Claude Code",