Skip to content
Sign in
KnowledgeQuery rewriteMenu

Query rewritePro

The question as asked and the narrower searches the agent ran to answer it.

ProThe question as asked and the narrower searches the agent ran.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/query-rewrite

Usage

tsx
import { QueryRewrite } from "@/components/ui/chatcn/pro/query-rewrite"

<QueryRewrite original={question} queries={searches} />

Shows where each search ran, how many results came back and which failed, so a thin answer can be traced to a thin search.

Examples

States

ProCollapsed and one query.

Props

PropTypeNotes
originalstringThe question as asked
queriesSubQuery[]{ id, query, source?, status, results? }
defaultOpenbooleanDefault true

Accessibility

  • The header is a disclosure button with aria-expanded.
  • Failed searches say so in words.