"use client";
import {
Brain,
CheckCircle2,
ChevronDown,
Circle,
Lightbulb,
Loader2,
Search,
Sparkles,
} from "lucide-react";
import React from "react";
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
import { cn } from "@/lib/utils";
export type ChainOfThoughtItemProps = React.ComponentProps<"div">;
export const ChainOfThoughtItem = ({ children, className, ...props }: ChainOfThoughtItemProps) => (
{children}
);
export type ChainOfThoughtTriggerProps = React.ComponentProps & {
leftIcon?: React.ReactNode;
swapIconOnHover?: boolean;
};
export const ChainOfThoughtTrigger = ({
children,
className,
leftIcon,
swapIconOnHover = true,
...props
}: ChainOfThoughtTriggerProps) => (
{leftIcon ? (
{leftIcon}
{swapIconOnHover && (
)}
) : (
)}
{children}
{!leftIcon && (
)}
);
export type ChainOfThoughtContentProps = React.ComponentProps;
export const ChainOfThoughtContent = ({
children,
className,
...props
}: ChainOfThoughtContentProps) => {
return (
);
};
export type ChainOfThoughtProps = {
children: React.ReactNode;
className?: string;
};
export function ChainOfThought({ children, className }: ChainOfThoughtProps) {
const childrenArray = React.Children.toArray(children);
return (
{childrenArray.map((child, index) => (
{React.isValidElement(child) &&
React.cloneElement(child as React.ReactElement, {
isLast: index === childrenArray.length - 1,
})}
))}
);
}
export type ChainOfThoughtStepProps = {
children: React.ReactNode;
className?: string;
isLast?: boolean;
};
export const ChainOfThoughtStep = ({
children,
className,
isLast = false,
...props
}: ChainOfThoughtStepProps & React.ComponentProps) => {
return (
{children}
);
};