import { For, Show } from "solid-js" import { usePlugin } from "@opencode/plugin/gui" import { latest } from "./queries" import { errorMessage, type Actions } from "./actions" import { fileContext } from "./context" import { DiffList } from "./diff" import { Clamp, createFolds } from "./fold" import { ago } from "./panel" /** A side tab with one commit from GitHub: its message, parents and diff. */ export function CommitView(props: { repo: string; sha: string; actions: Actions }) { const ctx = usePlugin() const ui = ctx.ui const t = ctx.t const q = props.actions.queries const data = latest(q.query(() => q.options.commit(props.repo, props.sha))) const folds = createFolds() return (