/** * `CompletionInput` — a text field wired to MCP `completion/complete`. As the * human types, it asks the provided `fetchCompletions` (a thin wrapper over the * MCP completions capability) for argument suggestions and renders them as a * selectable list; picking one fills the field. A fetch failure clears the * suggestions and surfaces through `onError` — never a silent swallow. * * The field is a `tai-input` and its popup wears the Select popup's classes * (`tai-select-content` / `tai-select-item`), so a suggestion list and a select * list are the same object to a reader. * * Reusable by any feature; the intended consumer is a `SchemaForm` string field * that has a completion provider for its tool/prompt/resource argument. */ import type { ReactNode } from 'react'; export interface CompletionInputProps { readonly value: string; readonly onChange: (value: string) => void; /** Fetch argument completions for the current input value. */ readonly fetchCompletions: (value: string) => Promise; /** Surfaced (not swallowed) when a completion fetch fails. */ readonly onError?: (error: unknown) => void; readonly placeholder?: string; } /** * A completion-backed text input. Suggestions refresh on every edit (a * per-request sequence guard drops a stale response) and render as an ARIA * listbox; selecting an option fills the field and clears the list. */ export declare function CompletionInput({ value, onChange, fetchCompletions, onError, placeholder, }: CompletionInputProps): ReactNode; //# sourceMappingURL=completion-input.d.ts.map