diff --git a/design-system/apps/design-lab/src/preview/FlowChatPreviewRegistry.tsx b/design-system/apps/design-lab/src/preview/FlowChatPreviewRegistry.tsx index 20779c2d5b..6d6057e8c9 100644 --- a/design-system/apps/design-lab/src/preview/FlowChatPreviewRegistry.tsx +++ b/design-system/apps/design-lab/src/preview/FlowChatPreviewRegistry.tsx @@ -7,6 +7,7 @@ import { Archive, ArrowDownToLine, ArrowUp, + CalendarClock, CheckCircle2, Circle, Code2, @@ -59,6 +60,7 @@ import { ChatComposerQueueTitle, CommandToolCard, ContextCompressionToolCard, + CronToolCard, DefaultToolCard, DirectoryListToolCard, FileDiffToolCard, @@ -678,7 +680,7 @@ function SessionPreview({ const PREVIEW_IMAGE = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Crect width='320' height='320' rx='32' fill='%23232a35'/%3E%3Cpath d='M60 235l64-76 42 45 31-36 63 67z' fill='%237e8ca3'/%3E%3Ccircle cx='224' cy='91' r='25' fill='%23c6cfdb'/%3E%3C/svg%3E"; -type StandardAmbientPreviewKind = "default" | "run-code" | "todo" | "view-image" | "web-fetch"; +type StandardAmbientPreviewKind = "cron" | "default" | "run-code" | "todo" | "view-image" | "web-fetch"; function StandardAmbientPreview({ interactive, @@ -753,6 +755,25 @@ function StandardAmbientPreview({ statusText={state === "loading" ? t("components.preview.flowChat.running") : "Viewed image"} /> ); + } else if (kind === "cron") { + card = ( + + ); } else { card = ( , + section: "tool-card", + specimens: [{ tool: "Cron" }], + }, DefaultToolCard: { attention: "ambient", codeSample: concreteCodeSample("DefaultToolCard"), diff --git a/design-system/apps/design-lab/vite/component-detail-contract.test.mjs b/design-system/apps/design-lab/vite/component-detail-contract.test.mjs index c9527480b6..5f2aaa21b9 100644 --- a/design-system/apps/design-lab/vite/component-detail-contract.test.mjs +++ b/design-system/apps/design-lab/vite/component-detail-contract.test.mjs @@ -120,6 +120,7 @@ test("FlowChat gallery renders only the real migrated tool-card components", asy "WriteStdin", "ExecControl", "ContextCompression", + "Cron", "ControlHub", "FinalizeMiniApp", "PublishMiniApp", diff --git a/design-system/packages/ui/src/flow-chat/tool-cards/SessionToolCards.tsx b/design-system/packages/ui/src/flow-chat/tool-cards/SessionToolCards.tsx index db3f563f18..778ab967ce 100644 --- a/design-system/packages/ui/src/flow-chat/tool-cards/SessionToolCards.tsx +++ b/design-system/packages/ui/src/flow-chat/tool-cards/SessionToolCards.tsx @@ -1,6 +1,6 @@ import { OverflowText } from '../../primitives/OverflowText'; import type { HTMLAttributes, ReactNode } from "react"; -import { Layers, MessageSquare } from "lucide-react"; +import { CalendarClock, Layers, MessageSquare } from "lucide-react"; import { AmbientToolCard, AmbientToolCardHeader, @@ -124,3 +124,10 @@ export interface SessionMessageToolCardProps export function SessionMessageToolCard(props: SessionMessageToolCardProps) { return