g1t/apps/web/app/routes/repo/tree.tsx
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 type { Route } from "./+types/tree"; |
| Social cards for every page: og.g1t.sh | 2 | import { page } from "../../lib/meta"; |
| Initial g1t: services, event bus, intents and attempts | 3 | import { TreeView } from "../../components/repo-view"; |
| Rust repos service with shipping; pull requests kept in the model | 4 | import { repos } from "../../lib/services.server"; |
| Initial g1t: services, event bus, intents and attempts | 5 | import { getViewer, unwrap } from "../../lib/session.server"; |
| 6 | ||
| Social cards for every page: og.g1t.sh | 7 | export function meta({ params, ...args }: Route.MetaArgs) { |
| Initial g1t: services, event bus, intents and attempts | 8 | const path = params["*"] ? `${params["*"]} · ` : ""; |
| Social cards for every page: og.g1t.sh | 9 | return page(args, { title: `${path}${params.owner}/${params.repo} · g1t` }); |
| Initial g1t: services, event bus, intents and attempts | 10 | } |
| 11 | ||
| 12 | export async function loader({ params, context }: Route.LoaderArgs) { | |
| 13 | const path = { namespace: params.owner, name: params.repo }; | |
| 14 | return unwrap( | |
| Rust repos service with shipping; pull requests kept in the model | 15 | await repos.tree(path, getViewer(context), params.ref, params["*"] ?? ""), |
| Initial g1t: services, event bus, intents and attempts | 16 | ); |
| 17 | } | |
| 18 | ||
| 19 | export default function Tree({ loaderData }: Route.ComponentProps) { | |
| 20 | return <TreeView tree={loaderData} />; | |
| 21 | } |