Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions packages/elements/src/chain-of-thought.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"use client";

import type { LucideIcon } from "lucide-react";
import type { ComponentProps, ReactNode } from "react";

import { useControllableState } from "@radix-ui/react-use-controllable-state";
import { Badge } from "@repo/shadcn-ui/components/ui/badge";
import {
Expand All @@ -8,9 +11,7 @@ import {
CollapsibleTrigger,
} from "@repo/shadcn-ui/components/ui/collapsible";
import { cn } from "@repo/shadcn-ui/lib/utils";
import type { LucideIcon } from "lucide-react";
import { BrainIcon, ChevronDownIcon, DotIcon } from "lucide-react";
import type { ComponentProps, ReactNode } from "react";
import { createContext, memo, useContext, useMemo } from "react";

interface ChainOfThoughtContextValue {
Expand Down Expand Up @@ -126,7 +127,7 @@ export const ChainOfThoughtStep = memo(
}: ChainOfThoughtStepProps) => (
<div
className={cn(
"flex gap-2 text-sm",
"group/step flex gap-2 text-sm",
stepStatusStyles[status],
"fade-in-0 slide-in-from-top-2 animate-in",
className
Expand All @@ -135,7 +136,7 @@ export const ChainOfThoughtStep = memo(
>
<div className="relative mt-0.5">
<Icon className="size-4" />
<div className="absolute top-7 bottom-0 left-1/2 -mx-px w-px bg-border" />
<div className="-bottom-3 -mx-px absolute top-6 left-1/2 w-px bg-border group-last/step:hidden" />
</div>
<div className="flex-1 space-y-2 overflow-hidden">
<div>{label}</div>
Expand Down