flagon-io/g1t

public

Git for AI scale: a forge for thousands of agents working on the same code at once.

g1t/apps/docs/src/components/AgentSetup.astro

32 lines1,069 bytesCodeBlame

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.

Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look1---
2// How to connect a coding agent to g1t: a tab per agent. Every block on
3// the page switches together, and Starlight remembers the choice
4// (`syncKey`). The snippets live in `src/data/agents.ts`.
5import { Code, TabItem, Tabs } from '@astrojs/starlight/components';
6
7import { AGENTS, AGENTS_WITH_TOKEN } from '../data/agents';
8
9interface Props {
10 /** `token` shows each agent with a bearer token instead of signing in through the browser. */
11 variant?: 'browser' | 'token';
12}
13
14const { variant = 'browser' } = Astro.props;
15const agents = variant === 'token' ? AGENTS_WITH_TOKEN : AGENTS;
16const parts = (text: string) => text.split('`').map((part, index) => ({ part, code: index % 2 === 1 }));
17---
18
19<Tabs syncKey="agent">
20 {
21 agents.map((agent) => (
22 <TabItem label={agent.label}>
23 <Code code={agent.code} lang={agent.lang} title={agent.file ?? undefined} frame={agent.file ? 'code' : 'none'} />
24 {agent.then && (
25 <p>
26 {parts(agent.then).map(({ part, code }) => (code ? <code>{part}</code> : part))}
27 </p>
28 )}
29 </TabItem>
30 ))
31 }
32</Tabs>