diff --git a/web/src/components/chat/ChatQuickReplies.tsx b/web/src/components/chat/ChatQuickReplies.tsx new file mode 100644 index 0000000000..2499b305c6 --- /dev/null +++ b/web/src/components/chat/ChatQuickReplies.tsx @@ -0,0 +1,49 @@ +import { useTranslation } from "react-i18next"; +import { Button } from "@/components/ui/button"; + +type QuickReply = { labelKey: string; textKey: string }; + +const REPLIES: QuickReply[] = [ + { + labelKey: "quick_reply_find_similar", + textKey: "quick_reply_find_similar_text", + }, + { + labelKey: "quick_reply_tell_me_more", + textKey: "quick_reply_tell_me_more_text", + }, + { labelKey: "quick_reply_when_else", textKey: "quick_reply_when_else_text" }, +]; + +type ChatQuickRepliesProps = { + onSend: (text: string) => void; + disabled?: boolean; +}; + +/** + * Row of pill buttons shown in the composer while an attachment is pending. + * Clicking a pill immediately calls onSend with the canned text. + */ +export function ChatQuickReplies({ + onSend, + disabled = false, +}: ChatQuickRepliesProps) { + const { t } = useTranslation(["views/chat"]); + + return ( +