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