Skip to content

Commit

Permalink
Updated chatSegment model
Browse files Browse the repository at this point in the history
  • Loading branch information
salmenus committed Apr 25, 2024
1 parent 17aa671 commit 9af221a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ export class CompChatSegment<AiMsg> extends BaseComp<

public addChunk(chatItemId: string, chunk: string) {
domOp(() => {
this.throwIfDestroyed();
if (this.destroyed) {
return;
}

const chatItem = this.chatItems.get(chatItemId);
if (!chatItem) {
throw new Error(`CompChatSegment: chat item with id "${chatItemId}" not found`);
Expand Down

0 comments on commit 9af221a

Please sign in to comment.