An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
refactor: Update Copilot component to use StreamableValue for inquiry prop
Yoshiki Miura175a11b2ba11
diff --git a/components/copilot.tsx b/components/copilot.tsxindex a9b62c56..2c3e49e5 100644--- a/components/copilot.tsx+++ b/components/copilot.tsx@@ -7,13 +7,17 @@ import { Checkbox } from './ui/checkbox'import { Button } from './ui/button'import { Card } from './ui/card'import { ArrowRight, Check, FastForward, Sparkles } from 'lucide-react'-import { useActions, useStreamableValue, useUIState } from 'ai/rsc'+import {+ StreamableValue,+ useActions,+ useStreamableValue,+ useUIState+} from 'ai/rsc'import type { AI } from '@/app/actions'import { IconLogo } from './ui/icons'-import { cn } from '@/lib/utils'export type CopilotProps = {- inquiry?: PartialInquiry+ inquiry?: StreamableValue<PartialInquiry>}export const Copilot: React.FC<CopilotProps> = ({ inquiry }: CopilotProps) => {