Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

28 linesCodeBlameRaw
1/**
2 * The tabs under the header. Each shows its own part of the sidebar: the
3 * groups named in its `groups`, in the sidebar's order. A page belongs to
4 * the tab holding its group; the home page, in no group, to the first.
5 * The API reference tab takes every group not named here, since the
6 * operations' groups are named after the API's tags.
7 */
8export type Tab = { label: string; groups: string[] };
9
10export const TABS: Tab[] = [
11 { label: "Get started", groups: ["Get started", "About"] },
12 { label: "Work", groups: ["Work"] },
13 { label: "Coding agents", groups: ["Coding agents"] },
14 { label: "Chat", groups: ["Chat"] },
15 { label: "Code", groups: ["Landing changes", "Security"] },
16 { label: "Projects", groups: ["Projects"] },
17 { label: "Workspaces", groups: ["Workspaces", "Connect your tools"] },
18 { label: "Self-hosting", groups: ["Run g1t yourself"] },
19 { label: "Architecture", groups: ["Architecture"] },
20 { label: "API reference", groups: [] },
21];
22
23const API = TABS[TABS.length - 1];
24
25/** The tab that holds the sidebar group with this label. */
26export function tabForGroup(label: string): Tab {
27 return TABS.find((tab) => tab.groups.includes(label)) ?? API;
28}