Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Docs in the shape of docs.continue.dev | 1 | /** |
| Merge branch 'worktree-agent-ab2e39e11a6493412' | 2 | * The tabs under the header. Each shows its own part of the sidebar: the |
| 3 | * groups whose pages fit its `match`. A page belongs to the tab whose | |
| 4 | * `match` it fits. | |
| Docs in the shape of docs.continue.dev | 5 | */ |
| Merge branch 'worktree-agent-ab2e39e11a6493412' | 6 | export type Tab = { label: string; href: string; match: (slug: string) => boolean }; |
| Docs in the shape of docs.continue.dev | 7 | |
| 8 | export const TABS: Tab[] = [ | |
| 9 | { | |
| 10 | label: 'Documentation', | |
| 11 | href: '/', | |
| 12 | match: (slug) => !slug.startsWith('reference/'), | |
| 13 | }, | |
| 14 | { | |
| 15 | label: 'API reference', | |
| 16 | href: '/reference/api/', | |
| 17 | match: (slug) => slug.startsWith('reference/'), | |
| 18 | }, | |
| 19 | ]; | |
| 20 | ||
| 21 | export function tabFor(slug: string): Tab { | |
| 22 | return TABS.find((tab) => tab.match(slug)) ?? TABS[0]; | |
| 23 | } |
This file's history is long; its oldest lines are credited to the oldest commit read.