Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 13 additions & 1 deletion components/suggested-questions.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
"use client";

import { Button } from "@/components/ui/button";

/**
* Properties for the SuggestedQuestions component.
*/
interface SuggestedQuestionsProps {
/** The list of strings to be displayed as clickable suggestion buttons. */
questions: string[];
/** Callback function executed when a suggestion is clicked. Passes the text and index. */
onQuestionClick: (question: string, index: number) => void;
/** Optional: Indicates if data is currently being fetched. */
isLoading?: boolean;
/** Optional: If true, disables buttons to prevent multiple clicks during an active chat. */
isChatLoading?: boolean;
}

/**
* Renders a list of suggested prompts for the user to interact with.
* Designed to appear at the end of a chat sequence.
*/
export function SuggestedQuestions({
questions,
onQuestionClick,
Expand Down Expand Up @@ -35,4 +47,4 @@ export function SuggestedQuestions({
})}
</div>
);
}
}
8 changes: 8 additions & 0 deletions components/ui/dropdown-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"

import { cn } from "@/lib/utils"

/**
* Root component for the dropdown menu.
* Provides the context and state for all other dropdown components.
*/
function DropdownMenu({
...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />
}

/**
* Portals the dropdown content into a different part of the DOM tree.
* Useful for escaping overflow-hidden containers.
*/
function DropdownMenuPortal({
...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
Expand Down
4 changes: 4 additions & 0 deletions components/ui/input.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import * as React from "react"

/**
* input component
*/

import { cn } from "@/lib/utils"

function Input({ className, type, ...props }: React.ComponentProps<"input">) {
Expand Down