/** @jsx createElement */ import type { Renderer } from '../../../types'; import type { ClientSideToolComponentProps } from '../types'; import type { ComparisonTableTranslations } from './createGroundedComparisonTable'; /** * Builtin comparison tool (`algolia_compare_products`). * * The agent triggers this client-side tool when it detects a comparison * request. Its arguments name ONLY the products (by objectID) and the attribute * *keys* to compare — never the values. Every cell is hydrated from the chat * records store (`context.records`, filled by the search tools), so the model * physically cannot type (and therefore cannot hallucinate) a price or spec. * This is the "grounded table" fix from the agentic-evals comparison study, * promoted from the display-block prototype to a first-class tool. * * Tool-call input it consumes: * * { * objectIDs: ['A', 'B'], // 2+ products, one row each * attributes: ['price', 'rating'], // attribute KEYS (also headers) * columns?: ['Product', 'Price', 'Rating'], // optional display labels * intro?: 'Both are great for...' // optional one-line lead-in * } * * Any other input field (e.g. smuggled attribute values) is ignored by * construction: the renderer never reads values off the input. */ export type CompareProductsToolInput = { objectIDs?: unknown; attributes?: unknown; columns?: unknown; intro?: unknown; }; export type CompareProductsToolProps = { toolProps: ClientSideToolComponentProps; translations?: Partial; }; export declare function createCompareProductsToolComponent({ createElement, Fragment, }: Renderer): (userProps: CompareProductsToolProps) => JSX.Element;