FakeAssistantStream

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

An assistant message that receives text until it completes.

import type { FakeAssistantStream } from '@threadplane/core/testing';

Declaration

export interface FakeAssistantStream  {
  append(text: string): void;
  complete(outcome?: CompleteOutcome): void;
  readonly id: string;
}

Members

append · overload 1

Appends text to the message content and publishes a new snapshot.

append(text: string): void;

Parameters

text · required
string

Returns

void

complete · overload 1

Marks the message complete and returns the session to 'idle', or to 'error' when the session holds an error. Later calls are ignored.

complete(outcome?: CompleteOutcome): void;

Parameters

outcome · optional
CompleteOutcome

Returns

void

id

readonly id: string;