FakeAssistantStream
An assistant message that receives text until it completes.
import type { FakeAssistantStream } from '@threadplane/angular/chat/testing';Declaration
export interface FakeAssistantStream {
append(text: string): void;
appendReasoning(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· requiredstring
Returns
voidappendReasoning · overload 1
Appends reasoning text. The time from the first reasoning text to the
first content text, or to completion, becomes reasoningDurationMs.
appendReasoning(text: string): void;Parameters
text· requiredstring
Returns
voidcomplete · 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· optionalCompleteOutcome
Returns
voidid
readonly id: string;