/** @jsx createElement */ import type { RecordWithObjectID, Renderer } from '../../../types'; import type { ClientSideToolComponentProps } from '../types'; import type { ComparisonTableTranslations, GroundedComparisonTableProps } from './createGroundedComparisonTable'; /** * Builtin comparison tool (`algolia_compare_products`). * * The agent calls this client-side tool to lay out a comparison as a table: * the compared products across the top (hydrated from the chat records store, * `context.records`, so the header never shows a product that isn't in the * catalog) and model-authored criteria down the side. Each criterion carries * one value per product; the agent fills them from the records it has (an * attribute, a detail from the description, a derived verdict), so the table * can say everything a Markdown table could — with a proper layout. * * Tool-call input it consumes: * * { * objectIDs: ['A', 'B'], // 2+ products, one column each * criteria: [ // one row each, values aligned * { label: 'Price', values: ['$199', '$299'] }, * { label: 'Battery', values: ['4000 mAh', null] }, // null → "—" * ], * intro?: 'Both are great for...' // optional one-line lead-in * } */ export type CompareProductsToolInput = { objectIDs?: unknown; criteria?: unknown; intro?: unknown; }; export type CompareProductsToolProps = { toolProps: ClientSideToolComponentProps; itemComponent?: GroundedComparisonTableProps['itemComponent']; translations?: Partial; }; export declare function createCompareProductsToolComponent({ createElement, Fragment }: Renderer): (userProps: CompareProductsToolProps) => JSX.Element;