Merge pull request #263 from mvanhorn/feat/180-agent-role-labels

feat(ui): show human-readable role labels in agent list and properties
This commit is contained in:
Dotta
2026-03-07 21:19:58 -06:00
committed by GitHub
6 changed files with 26 additions and 20 deletions

View File

@@ -10,7 +10,7 @@ import { EmptyState } from "../components/EmptyState";
import { PageSkeleton } from "../components/PageSkeleton";
import { AgentIcon } from "../components/AgentIconPicker";
import { Network } from "lucide-react";
import type { Agent } from "@paperclipai/shared";
import { AGENT_ROLE_LABELS, type Agent } from "@paperclipai/shared";
// Layout constants
const CARD_W = 200;
@@ -421,11 +421,7 @@ export function OrgChart() {
);
}
const roleLabels: Record<string, string> = {
ceo: "CEO", cto: "CTO", cmo: "CMO", cfo: "CFO",
engineer: "Engineer", designer: "Designer", pm: "PM",
qa: "QA", devops: "DevOps", researcher: "Researcher", general: "General",
};
const roleLabels = AGENT_ROLE_LABELS as Record<string, string>;
function roleLabel(role: string): string {
return roleLabels[role] ?? role;