diff --git a/studio/frontend/src/features/canvas-lab/components/block-sheet.tsx b/studio/frontend/src/features/canvas-lab/components/block-sheet.tsx index b2858b6e21..2b7cacd624 100644 --- a/studio/frontend/src/features/canvas-lab/components/block-sheet.tsx +++ b/studio/frontend/src/features/canvas-lab/components/block-sheet.tsx @@ -20,6 +20,7 @@ import type { ReactElement } from "react"; import type { LlmType, SamplerType } from "../types"; type SheetView = "root" | "sampler" | "llm" | "expression"; +type SheetKind = "sampler" | "llm" | "expression"; type BlockSheetProps = { container: HTMLDivElement | null; @@ -43,21 +44,26 @@ function getSheetTitle(view: SheetView): string { return "LLM blocks"; } -const MAIN_SHEET_ITEMS = [ +const MAIN_SHEET_ITEMS: Array<{ + kind: SheetKind; + title: string; + description: string; + icon: typeof Database02Icon; +}> = [ { - kind: "sampler" as const, + kind: "sampler", title: "Sampler", description: "Numeric + categorical blocks.", icon: Database02Icon, }, { - kind: "llm" as const, + kind: "llm", title: "LLM", description: "Text + structured blocks.", icon: SparklesIcon, }, { - kind: "expression" as const, + kind: "expression", title: "Expression", description: "Derived columns with Jinja.", icon: CodeIcon, @@ -138,7 +144,7 @@ const EXPRESSION_ITEMS = [ }, ]; -function nextViewForKind(kind: "sampler" | "llm" | "expression"): SheetView { +function nextViewForKind(kind: SheetKind): SheetView { if (kind === "sampler") { return "sampler"; } @@ -148,6 +154,38 @@ function nextViewForKind(kind: "sampler" | "llm" | "expression"): SheetView { return "llm"; } +function BlockSheetButton({ + icon, + title, + description, + onClick, +}: { + icon: typeof Database02Icon; + title: string; + description: string; + onClick: () => void; +}): ReactElement { + return ( + + ); +} + export function BlockSheet({ container, view, @@ -191,103 +229,43 @@ export function BlockSheet({