import { Markdown } from "~/ui/Markdown"; import type { Notebook, NotebookOutput } from "~/lib/code-intel"; import { cn } from "~/utils/cn"; function Output({ output }: { output: NotebookOutput }) { if (output.kind === "image") { return Cell output; } return (
      {output.text}
    
); } function Prompt({ label }: { label: string }) { return
{label}
; } export function NotebookView({ notebook }: { notebook: Notebook }) { return (
{notebook.cells.map((cell) => { if (cell.kind === "markdown") { return (
); } if (cell.kind === "raw") { return (
{cell.text}
); } const label = `[${cell.executionCount ?? " "}]`; return (
                {cell.source}
              
{cell.outputs.length > 0 && (
{cell.outputs.map((output) => ( ))}
)}
); })} {notebook.truncated &&

Only the first cells are shown.

}
); }