AskTool

Unpublished development API. This package is under development and is not available as a published release.

A tool the model calls and the person answers in the transcript; see ask.

import type { AskTool } from '@threadplane/react/chat';

Declaration

export interface AskTool<A, R>  {
  readonly description: string;
  readonly followUp?: boolean;
  readonly kind: 'ask';
  readonly parameters?: PlainValue;
  readonly render: (props: AskToolViewProps<A, R>) => ReactNode;
}

Type parameters

A
R

Members

description

readonly description: string;

followUp

Defaults to true; false persists the answer without another run.

readonly followUp?: boolean;

kind

readonly kind: 'ask';

parameters

Optional caller-authored JSON Schema, sent unchanged as metadata.

readonly parameters?: PlainValue;

render

Draws the control. Return an element; arguments are not validated before it is called.

readonly render: (props: AskToolViewProps<A, R>) => ReactNode;