@threadplane/ag-uiTypeAliasv0.3.7

ClientToolSession

The session createSession(options, tools) returns when it is given a handler map: it runs those tools itself and publishes their calls in the snapshot's clientTools.

import type { ClientToolSession } from '@threadplane/ag-ui';

Declaration

export type ClientToolSession<C extends Record<string, ToolContract>, TState = unknown> = Omit<Session<TState>, 'getSnapshot' | 'clientTools'> & {
    getSnapshot(): ClientToolSessionSnapshot<C, TState>;
};

Type parameters

C
Record<string, ToolContract>
TState
Default: unknown