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.
| Initial g1t: services, event bus, intents and attempts | 1 | import { env } from "cloudflare:workers"; |
| 2 | ||
| 3 | import type { Route } from "./+types/blob"; | |
| 4 | import { BlobView } from "../../components/repo-view"; | |
| API and MCP server, Rust identity service, registration, site redesign | 5 | import { highlight } from "../../lib/highlight.server"; |
| Initial g1t: services, event bus, intents and attempts | 6 | import { getViewer, unwrap } from "../../lib/session.server"; |
| 7 | ||
| 8 | export function meta({ params }: Route.MetaArgs) { | |
| 9 | return [{ title: `${params["*"]} · ${params.owner}/${params.repo} · g1t` }]; | |
| 10 | } | |
| 11 | ||
| 12 | export async function loader({ params, context }: Route.LoaderArgs) { | |
| 13 | const path = { namespace: params.owner, name: params.repo }; | |
| API and MCP server, Rust identity service, registration, site redesign | 14 | const blob = unwrap( |
| Initial g1t: services, event bus, intents and attempts | 15 | await env.REPOS.blob(path, getViewer(context), params.ref, params["*"] ?? ""), |
| 16 | ); | |
| API and MCP server, Rust identity service, registration, site redesign | 17 | return { |
| 18 | blob, | |
| 19 | html: blob.text == null ? null : await highlight(blob.path, blob.text), | |
| 20 | }; | |
| Initial g1t: services, event bus, intents and attempts | 21 | } |
| 22 | ||
| 23 | export default function Blob({ loaderData }: Route.ComponentProps) { | |
| API and MCP server, Rust identity service, registration, site redesign | 24 | return <BlobView blob={loaderData.blob} html={loaderData.html} />; |
| Initial g1t: services, event bus, intents and attempts | 25 | } |