g1t/apps/web/app/routes/repo/code.tsx

14 lines528 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.

Initial g1t: services, event bus, intents and attempts1import { env } from "cloudflare:workers";
2
3import type { Route } from "./+types/code";
4import { TreeView } from "../../components/repo-view";
5import { getViewer, unwrap } from "../../lib/session.server";
6
7export async function loader({ params, context }: Route.LoaderArgs) {
8 const path = { namespace: params.owner, name: params.repo };
9 return unwrap(await env.REPOS.tree(path, getViewer(context), null, ""));
10}
11
12export default function Code({ loaderData }: Route.ComponentProps) {
13 return <TreeView tree={loaderData} />;
14}