MCPcopy Create free account
hub / github.com/Fibi66/FeiControl / SystemInfo

Function SystemInfo

src/components/SystemInfo.tsx:34–141  ·  view source on GitHub ↗
({ data }: SystemInfoProps)

Source from the content-addressed store, hash-verified

32}
33
34export function SystemInfo({ data }: SystemInfoProps) {
35 if (!data) {
36 return (
37 <div
38 className="rounded-xl p-6 animate-pulse"
39 style={{ backgroundColor: "var(--card)" }}
40 >
41 <div
42 className="h-6 rounded w-1/3 mb-4"
43 style={{ backgroundColor: "var(--border)" }}
44 ></div>
45 <div className="space-y-3">
46 <div className="h-4 rounded w-2/3" style={{ backgroundColor: "var(--border)" }}></div>
47 <div className="h-4 rounded w-1/2" style={{ backgroundColor: "var(--border)" }}></div>
48 <div className="h-4 rounded w-3/4" style={{ backgroundColor: "var(--border)" }}></div>
49 </div>
50 </div>
51 );
52 }
53
54 const infoItems = [
55 {
56 icon: Server,
57 label: "Agent Name",
58 value: `${data.agent.emoji} ${data.agent.name}`,
59 sublabel: data.agent.creature,
60 },
61 {
62 icon: Clock,
63 label: "Uptime",
64 value: data.system.uptimeFormatted,
65 sublabel: `${data.system.hostname}`,
66 },
67 {
68 icon: Cpu,
69 label: "Node.js Version",
70 value: data.system.nodeVersion,
71 sublabel: data.system.platform,
72 },
73 {
74 icon: Brain,
75 label: "Current Model",
76 value: data.system.model.split("/").pop() || data.system.model,
77 sublabel: data.system.model.includes("/") ? data.system.model.split("/")[0] : "provider",
78 },
79 {
80 icon: FolderOpen,
81 label: "Workspace",
82 value: data.system.workspacePath.split("/").pop() || "workspace",
83 sublabel: data.system.workspacePath,
84 },
85 {
86 icon: HardDrive,
87 label: "Memory",
88 value: `${formatBytes(data.system.memory.used)} / ${formatBytes(data.system.memory.total)}`,
89 sublabel: `${formatBytes(data.system.memory.free)} free`,
90 },
91 ];

Callers

nothing calls this directly

Calls 1

formatBytesFunction · 0.85

Tested by

no test coverage detected