|
1 | | -import { Button } from "@/components/ui/button"; |
2 | | -import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"; |
3 | | -import { ScrollArea } from "@/components/ui/scroll-area"; |
4 | | -import { useEffect, useRef, useState } from "react"; |
5 | | -import { PiFile, PiImage, PiMagnifyingGlassBold, PiPaperPlaneTilt, PiRobotFill, PiSpinner, PiUserCircleFill } from "react-icons/pi"; |
6 | | -import { sendMessageToSearch } from "./actions"; |
| 1 | +"use client" |
| 2 | + |
| 3 | +import { Button } from "@/components/ui/button" |
| 4 | +import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog" |
| 5 | +import { ScrollArea } from "@/components/ui/scroll-area" |
| 6 | +import { useEffect, useRef, useState } from "react" |
| 7 | +import { PiFile, PiImage, PiMagnifyingGlassBold, PiPaperPlaneTilt, PiRobotFill, PiSpinner, PiUserCircleFill } from "react-icons/pi" |
| 8 | +import { sendMessageToSearch } from "./actions" |
7 | 9 | import ReactMarkdown from "react-markdown" |
8 | 10 | import { produce } from "immer" |
9 | | -import Image from "next/image"; |
10 | | -import { stripCodeBlockBackTicks } from "@/lib/utils"; |
| 11 | +import Image from "next/image" |
| 12 | +import { stripCodeBlockBackTicks } from "@/lib/utils" |
11 | 13 |
|
12 | 14 | export default function SearchDialog({ open }: { open: boolean }) { |
13 | 15 |
|
@@ -151,8 +153,8 @@ export default function SearchDialog({ open }: { open: boolean }) { |
151 | 153 | <textarea |
152 | 154 | onKeyDown={(e) => { |
153 | 155 | if (e.key === "Enter") { |
154 | | - e.preventDefault(); |
155 | | - handleSendMessage(); |
| 156 | + e.preventDefault() |
| 157 | + handleSendMessage() |
156 | 158 | } |
157 | 159 | }} |
158 | 160 | disabled={sending} |
|
0 commit comments