MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / buildSidebarItems

Function buildSidebarItems

dev/local/dashboard.tsx:70–84  ·  view source on GitHub ↗
(enabledGroups: Set<string>)

Source from the content-addressed store, hash-verified

68const kiloclawDevVarsPath = path.join(repoRoot, 'services/kiloclaw/.dev.vars');
69const alwaysOnGroupIds = new Set(getAlwaysOnGroupIds());
70const groupsById = new Map(getGroups().map(g => [g.id, g]));
71const sleep = (ms: number) => new Promise<void>(resolve => setTimeout(resolve, ms));
72
73function buildSidebarItems(enabledGroups: Set<string>): SidebarItem[] {
74 const items: SidebarItem[] = [];
75 for (const group of getGroups()) {
76 if (group.sectionBreakBefore) {
77 items.push({ kind: 'spacer' });
78 }
79 items.push({ kind: 'group', groupId: group.id });
80 if (enabledGroups.has(group.id)) {
81 for (const name of getGroupServiceNames(group.id)) {
82 items.push({ kind: 'service', name, groupId: group.id });
83 }
84 }
85 }
86 return items;
87}

Callers 1

DashboardFunction · 0.85

Calls 4

getGroupsFunction · 0.90
getGroupServiceNamesFunction · 0.90
pushMethod · 0.80
hasMethod · 0.80

Tested by

no test coverage detected