{tooltip}
58 |Used {count} sources
35 |{title}
70 |Thinking...
139 | ) : ( 140 |Thought for {duration} seconds
141 | )} 142 |{url}
236 | )} 237 | {description && ( 238 |239 | {description} 240 |
241 | )} 242 | {children} 243 |260 | {children} 261 |262 | ); 263 | -------------------------------------------------------------------------------- /components/ai-elements/web-preview.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { ChevronDownIcon } from 'lucide-react'; 4 | import type { ComponentProps, ReactNode } from 'react'; 5 | import { createContext, useContext, useState } from 'react'; 6 | import { Button } from '@/components/ui/button'; 7 | import { 8 | Collapsible, 9 | CollapsibleContent, 10 | CollapsibleTrigger, 11 | } from '@/components/ui/collapsible'; 12 | import { Input } from '@/components/ui/input'; 13 | import { 14 | Tooltip, 15 | TooltipContent, 16 | TooltipProvider, 17 | TooltipTrigger, 18 | } from '@/components/ui/tooltip'; 19 | import { cn } from '@/lib/utils'; 20 | 21 | export type WebPreviewContextValue = { 22 | url: string; 23 | setUrl: (url: string) => void; 24 | consoleOpen: boolean; 25 | setConsoleOpen: (open: boolean) => void; 26 | }; 27 | 28 | const WebPreviewContext = createContext
{tooltip}
122 |No console output
229 | ) : ( 230 | logs.map((log, index) => ( 231 |