Streaming Message
ngx-prompt-kit original — not part of ibelick/prompt-kit
createStreamingMessage() coordinates the pk-response-stream reveal handshake: accumulate tokens, mark the source stream done, and commit the final message only once the reveal animation catches up. Your store keeps the message-list mutation.
Examples
Simulated streamed reply
Click to stream tokens into pk-response-stream via the controller. When the source 'stream' ends the bubble keeps revealing; on (finished) the controller runs the commit callback, which appends the final message and clears the live bubble.
import { createStreamingMessage } from 'ngx-prompt-kit/streaming-message';
readonly stream = createStreamingMessage();
// on each token from your SSE handler:
this.stream.append(token);
// when the source stream ends:
this.stream.end(() => this.commitFinalMessage());
// template:
// <pk-response-stream [textStream]="stream.text()" [done]="stream.done()"
// [adaptive]="true" (finished)="stream.finished()" />Installation
Add the streaming-message helper to your project.
ng generate ngx-prompt-kit:streaming-message